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



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

Review comment:
       I'm sure the odds of this are super low, but to really make this 
airtight you'd need to have the `List<TaskMetadata>` that you use for the test 
be the same one that you test in this condition, otherwise it's _possible_ for 
the one task to have been revoked in the split second between 
`waitForCondition()` and the new call to `metadataForLocalThreads()`. 




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


Reply via email to