You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/07/20 10:25:58 UTC

[GitHub] [kafka] cadonna commented on a change in pull request #11083: KAFKA-13010: Retry getting tasks incase of rebalance for TaskMetadata tests

cadonna commented on a change in pull request #11083:
URL: https://github.com/apache/kafka/pull/11083#discussion_r672999766



##########
File path: streams/src/test/java/org/apache/kafka/streams/integration/TaskMetadataIntegrationTest.java
##########
@@ -158,9 +158,13 @@ public void shouldReportCorrectEndOffsetInformation() {
         }
     }
 
-    private TaskMetadata getTaskMetadata(final KafkaStreams kafkaStreams) {
+    private TaskMetadata getTaskMetadata(final KafkaStreams kafkaStreams) throws InterruptedException {
+        TestUtils.waitForCondition( () -> kafkaStreams
+                .metadataForLocalThreads()
+                .stream()
+                .mapToLong(t -> t.activeTasks().size())
+                .sum() == 1, "only one task");

Review comment:
       Could you please add a more descriptive failure message?




-- 
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