horizonzy commented on PR #15088:
URL: https://github.com/apache/pulsar/pull/15088#issuecomment-1113521990

   Hi, This change make test unstable. If use `receive(int timeout, TimeUnit 
unit)` here, it maybe return `null`.
   see:
   
https://github.com/apache/pulsar/blob/2ddef95f31ce37486f3f76b4d59730361a77bf6e/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java#L489-L492
   
   In the tests code:
   
https://github.com/apache/pulsar/blob/2ddef95f31ce37486f3f76b4d59730361a77bf6e/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java#L2477-L2486
   
   The code will into `else branch`(line_2484). So the consumer can't receive 
all messages. 
   
   The assert will failed.
   
https://github.com/apache/pulsar/blob/2ddef95f31ce37486f3f76b4d59730361a77bf6e/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java#L2487
   
   We ofter found flaky tests failed recently. 
   
   There is a test result to prove it. 
   see:
   https://github.com/apache/pulsar/issues/10117#issuecomment-1113297053
   


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