This is an automated email from the ASF dual-hosted git repository.

penghui pushed a commit to branch branch-2.10
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit 9fc543087816f5be02b626a3607ffd72d29b7c0b
Author: Kai Wang <[email protected]>
AuthorDate: Wed Jul 13 08:54:27 2022 +0800

    Fix flaky-test: NonPersistentTopicE2ETest.testGC (#16505)
    
    (cherry picked from commit d96243ff0c1ab36240bd744742ef82cbf64565fd)
---
 .../org/apache/pulsar/broker/service/NonPersistentTopicE2ETest.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/NonPersistentTopicE2ETest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/NonPersistentTopicE2ETest.java
index fb1dbfea3f1..34e0c97e7d3 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/NonPersistentTopicE2ETest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/NonPersistentTopicE2ETest.java
@@ -199,7 +199,9 @@ public class NonPersistentTopicE2ETest extends 
BrokerTestBase {
 
         
assertTrue(pulsar.getBrokerService().getTopicReference(topicName).isPresent());
         runGC();
-        
assertFalse(pulsar.getBrokerService().getTopicReference(topicName).isPresent());
+        Awaitility.await().untilAsserted(() ->
+                
assertFalse(pulsar.getBrokerService().getTopicReference(topicName).isPresent())
+        );
 
         // 2. Topic is not GCed with live connection
         String subName = "sub1";

Reply via email to