nicoloboschi opened a new pull request #14646:
URL: https://github.com/apache/pulsar/pull/14646


   ### Motivation
   ManagedLedgerFactoryShutdownTest#openEncounteredShutdown is flaky. I've seen 
failing that due to timeout.
   
   ```
   [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 
8.941 s <<< FAILURE! - in 
org.apache.bookkeeper.mledger.impl.ManagedLedgerFactoryShutdownTest
   [ERROR] 
openEncounteredShutdown(org.apache.bookkeeper.mledger.impl.ManagedLedgerFactoryShutdownTest)
  Time elapsed: 5.033 s  <<< FAILURE!
   org.testng.internal.thread.ThreadTimeoutException: Method 
org.apache.bookkeeper.mledger.impl.ManagedLedgerFactoryShutdownTest.openEncounteredShutdown()
 didn't finish within the time-out 5000
   ```
   After investigating I found out that the first Mockito `mock` call takes 
more than 2-3 seconds.
   
   Mockito setup should be done in the @BeforeMethod and leave the timeout to 
the managed ledger logic. 
   
   ### Modifications
   * Moved the the mockito setup to the @BeforeMethod method
   
   - [x] `no-need-doc` 


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