lucasbru commented on code in PR #17695:
URL: https://github.com/apache/kafka/pull/17695#discussion_r1831150283
##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/StreamsGroupHeartbeatRequestManagerTest.java:
##########
@@ -213,6 +242,39 @@ void testFullStaticInformationWhenJoining() {
assertEquals(1, request.data().clientTags().size());
assertEquals("clientTag1", request.data().clientTags().get(0).key());
assertEquals("value2", request.data().clientTags().get(0).value());
+ assertEquals(streamsAssignmentInterface.topologyId(),
request.data().topologyId());
+ assertNotNull(request.data().topology());
+ final List<StreamsGroupHeartbeatRequestData.Subtopology> subtopologies
= request.data().topology();
+ assertEquals(1, subtopologies.size());
+ final StreamsGroupHeartbeatRequestData.Subtopology subtopology =
subtopologies.get(0);
+ assertEquals(subtopologyName1, subtopology.subtopologyId());
+ assertEquals(Arrays.asList("sourceTopic1", "sourceTopic2"),
subtopology.sourceTopics());
+ assertEquals(Arrays.asList("repartitionSinkTopic1",
"repartitionSinkTopic2", "repartitionSinkTopic3"),
subtopology.repartitionSinkTopics());
+ assertEquals(repartitionSourceTopics.size(),
subtopology.repartitionSourceTopics().size());
+ subtopology.repartitionSourceTopics().forEach(topicInfo -> {
+ final StreamsAssignmentInterface.TopicInfo repartitionTopic =
repartitionSourceTopics.get(topicInfo.name());
+ assertEquals(repartitionTopic.numPartitions.get(),
topicInfo.partitions());
+ assertEquals(repartitionTopic.replicationFactor.get(),
topicInfo.replicationFactor());
+ });
+ assertEquals(changelogTopics.size(),
subtopology.stateChangelogTopics().size());
+ subtopology.stateChangelogTopics().forEach(topicInfo -> {
+ assertTrue(changelogTopics.containsKey(topicInfo.name()));
+ assertEquals(0, topicInfo.partitions());
+ final StreamsAssignmentInterface.TopicInfo changelogTopic =
changelogTopics.get(topicInfo.name());
+ assertEquals(changelogTopic.replicationFactor.get(),
topicInfo.replicationFactor());
+ });
+
Review Comment:
Done
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]