Skip to content

Commit 0d8a453

Browse files
committed
add integration test to check for added group support in config apis
1 parent a596680 commit 0d8a453

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

tests/integration/admin/test_incremental_alter_configs.py

+33
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
ConfigEntry, ResourceType, \
2020
AlterConfigOpType
2121

22+
from tests.common import TestUtils
23+
2224

2325
def assert_expected_config_entries(fs, num_fs, expected):
2426
"""
@@ -147,3 +149,34 @@ def test_incremental_alter_configs(kafka_cluster):
147149

148150
# Assert expected config entries.
149151
assert_expected_config_entries(fs, 1, expected)
152+
153+
if TestUtils.use_group_protocol_consumer():
154+
group_id = "test-group"
155+
156+
res_group = ConfigResource(
157+
ResourceType.GROUP,
158+
group_id,
159+
incremental_configs=[
160+
ConfigEntry("consumer.session.timeout.ms", "50000",
161+
incremental_operation=AlterConfigOpType.SET)
162+
]
163+
)
164+
165+
expected[res_group] = ['consumer.session.timeout.ms="50000"']
166+
167+
#
168+
# Incrementally alter some configuration values
169+
#
170+
fs = admin_client.incremental_alter_configs([res_group])
171+
172+
assert_operation_succeeded(fs, 1)
173+
174+
time.sleep(1)
175+
176+
#
177+
# Get current group config
178+
#
179+
fs = admin_client.describe_configs([res_group])
180+
181+
# Assert expected config entries.
182+
assert_expected_config_entries(fs, 1, expected)

0 commit comments

Comments
 (0)