showuon commented on a change in pull request #11948: URL: https://github.com/apache/kafka/pull/11948#discussion_r835060883
########## File path: streams/src/test/java/org/apache/kafka/streams/integration/PurgeRepartitionTopicIntegrationTest.java ########## @@ -203,10 +204,11 @@ public void shouldRestoreState() throws Exception { TestUtils.waitForCondition(new RepartitionTopicCreatedWithExpectedConfigs(), 60000, "Repartition topic " + REPARTITION_TOPIC + " not created with the expected configs after 60000 ms."); + // wait until we received more than 1 segment of data, so that we can confirm the purge succeeds in next verification TestUtils.waitForCondition( - new RepartitionTopicVerified(currentSize -> currentSize > 0), + new RepartitionTopicVerified(currentSize -> currentSize > PURGE_SEGMENT_BYTES), Review comment: side fix: we used to only make sure we received data before verifying the purge result. But it might be `0 < current size < PURGE_SEGMENT_BYTES`, and next, we verify `currentSize <= PURGE_SEGMENT_BYTES` will get passed directly, even though there's no purge happened. Fix it by making sure we received more than `PURGE_SEGMENT_BYTES` size of data -- 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