From 0d8a4531fbad377f0240d66648bdd7c36c5a9fc4 Mon Sep 17 00:00:00 2001 From: PratRanj07 Date: Mon, 18 Nov 2024 15:41:39 +0530 Subject: [PATCH] add integration test to check for added group support in config apis --- .../admin/test_incremental_alter_configs.py | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/tests/integration/admin/test_incremental_alter_configs.py b/tests/integration/admin/test_incremental_alter_configs.py index 24428e6f1..86ba30a69 100644 --- a/tests/integration/admin/test_incremental_alter_configs.py +++ b/tests/integration/admin/test_incremental_alter_configs.py @@ -19,6 +19,8 @@ ConfigEntry, ResourceType, \ AlterConfigOpType +from tests.common import TestUtils + def assert_expected_config_entries(fs, num_fs, expected): """ @@ -147,3 +149,34 @@ def test_incremental_alter_configs(kafka_cluster): # Assert expected config entries. assert_expected_config_entries(fs, 1, expected) + + if TestUtils.use_group_protocol_consumer(): + group_id = "test-group" + + res_group = ConfigResource( + ResourceType.GROUP, + group_id, + incremental_configs=[ + ConfigEntry("consumer.session.timeout.ms", "50000", + incremental_operation=AlterConfigOpType.SET) + ] + ) + + expected[res_group] = ['consumer.session.timeout.ms="50000"'] + + # + # Incrementally alter some configuration values + # + fs = admin_client.incremental_alter_configs([res_group]) + + assert_operation_succeeded(fs, 1) + + time.sleep(1) + + # + # Get current group config + # + fs = admin_client.describe_configs([res_group]) + + # Assert expected config entries. + assert_expected_config_entries(fs, 1, expected)