You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "aliehsaeedii (via GitHub)" <gi...@apache.org> on 2025/08/04 13:14:56 UTC
Re: [PR] KAFKA-19550 Integration test for Streams-related Admin APIs[1/N] [kafka]
aliehsaeedii commented on code in PR #20244:
URL: https://github.com/apache/kafka/pull/20244#discussion_r2251454216
##########
core/src/test/scala/integration/kafka/api/PlaintextAdminIntegrationTest.scala:
##########
@@ -4363,6 +4364,170 @@ class PlaintextAdminIntegrationTest extends BaseAdminIntegrationTest {
}
}
}
+
+ @ParameterizedTest(name = TestInfoUtils.TestWithParameterizedGroupProtocolNames)
+ @MethodSource(Array("getTestGroupProtocolParametersStreamsGroupProtocolOnly"))
+ def testDescribeStreamsGroups(groupProtocol: String): Unit = {
+ val streamsGroupId = "stream_group_id"
+ val testTopicName = "test_topic"
+ val testOutputTopicName = "test_output_topic"
+ val testNumPartitions = 1
+
+ val config = createConfig
+ client = Admin.create(config)
+
+ prepareTopics(List(testTopicName, testOutputTopicName), testNumPartitions)
+ prepareRecords(testTopicName)
+
+ val streamsConfig = new Properties()
+ streamsConfig.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest")
+ streamsConfig.put(StreamsConfig.COMMIT_INTERVAL_MS_CONFIG, 10 * 1000)
+ val streams = createStreamsGroup(
+ configOverrides = streamsConfig,
+ inputTopic = testTopicName,
+ outputTopic = testOutputTopicName,
+ streamsGroupId = streamsGroupId,
+ groupProtocol = groupProtocol
+ )
+
+ try {
+ streams.cleanUp()
+ streams.start()
+
+ TestUtils.waitUntilTrue(() => streams.state() == KafkaStreams.State.RUNNING, "Streams not in RUNNING state")
+
+ TestUtils.waitUntilTrue(() => {
+ client.listGroups().all().get().stream()
+ .anyMatch(g => g.groupId() == streamsGroupId)
+ }, "Streams group not ready to describe yet")
+
+ Thread.sleep(10000)
+
+ TestUtils.waitUntilTrue(() => {
+ try {
+ val describedGroups = client.describeStreamsGroups(util.List.of(streamsGroupId)).all().get()
Review Comment:
Calling the method to be tests (`describeStreamsGroups`) is strange here!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org