lianetm commented on code in PR #16673: URL: https://github.com/apache/kafka/pull/16673#discussion_r1697113666
########## clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java: ########## @@ -453,7 +453,8 @@ public void testSubscription(GroupProtocol groupProtocol) { consumer.assign(singletonList(tp0)); assertTrue(consumer.subscription().isEmpty()); - assertEquals(singleton(tp0), consumer.assignment()); + TestUtils.waitForCondition(() -> consumer.assignment().equals(singleton(tp0)), + "Expected consumer to be assigned the partition"); Review Comment: If the suggestion on my [comment](https://github.com/apache/kafka/pull/16673/files#r1697100482) above works, I would expect we won't need to change this test like this (shows a rather undesired behaviour of the assign I would say). We would end with the test unchanged probably, with the assignment effectively changed when assign() returns for both consumers. -- 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-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org