aloyszhang commented on a change in pull request #13055:
URL: https://github.com/apache/pulsar/pull/13055#discussion_r765720902



##########
File path: 
pulsar-broker/src/test/java/org/apache/pulsar/client/impl/TopicDoesNotExistsTest.java
##########
@@ -61,11 +61,11 @@ public void testCreateProducerOnNotExistsTopic() throws 
PulsarClientException, I
                     .sendTimeout(100, TimeUnit.MILLISECONDS)
                     .create();
             Assert.fail("Create producer should failed while topic does not 
exists.");
-        } catch (PulsarClientException ignore) {
+        } catch (PulsarClientException e) {
+            Assert.assertTrue(e instanceof 
PulsarClientException.NotFoundException);
         }
         Thread.sleep(2000);
         HashedWheelTimer timer = (HashedWheelTimer) ((PulsarClientImpl) 
pulsarClient).timer();
-        Assert.assertEquals(timer.pendingTimeouts(), 0);

Review comment:
       > Awaiatility.await().untilAsserted(....)
   
   An awaiatility loop does not work, because the `sendTimeout` TimerTask will 
trigger another new TimerTask at the end of the task.




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


Reply via email to