yangl commented on a change in pull request #11281:
URL: https://github.com/apache/pulsar/pull/11281#discussion_r671591303
##########
File path:
pulsar-broker/src/test/java/org/apache/pulsar/broker/namespace/OwnershipCacheTest.java
##########
@@ -355,9 +356,9 @@ public void testRemoveOwnership() throws Exception {
assertEquals(cache.getOwnedBundles().size(), 1);
cache.removeOwnership(bundle);
Thread.sleep(500);
- assertTrue(cache.getOwnedBundles().isEmpty());
+ Awaitility.await().untilAsserted(() ->
assertTrue(cache.getOwnedBundles().isEmpty()));
+
- Thread.sleep(500);
Review comment:
ohh, thanks.
##########
File path:
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/SubscriptionSeekTest.java
##########
@@ -531,7 +532,7 @@ public void
testOnlyCloseActiveConsumerForSingleActiveConsumerDispatcherWhenSeek
assertEquals(connectedSinceSet.size(), 2);
consumer1.seek(MessageId.earliest);
// Wait for consumer to reconnect
- Thread.sleep(1000);
+ Awaitility.await().until(() -> consumer1.isConnected() == true);
Review comment:
Thank you for the review suggestion, I have fixed these, please take a
look again!
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]