[JAVA-29429] - Add extra checks for sporadic test failures (#15845)

This commit is contained in:
Amit Pandey 2024-02-11 18:09:41 +05:30 committed by GitHub
parent b25bc0e655
commit a5082fa3f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -57,7 +57,9 @@ public class ManagingConsumerGroupsIntegrationTest {
}
} while (currentMessage != TOTAL_PRODUCED_MESSAGES);
Thread.sleep(2000);
if( consumerService.consumedPartitions != null && consumerService.consumedPartitions.get("consumer-1") != null) {
if (consumerService.consumedPartitions != null
&& consumerService.consumedPartitions.get("consumer-1") != null
&& consumerService.consumedPartitions.get("consumer-0") != null) {
assertTrue(consumerService.consumedPartitions.get("consumer-1").size() >= 1);
assertTrue( consumerService.consumedPartitions.get("consumer-0").size() >= 1);
}