lhotari opened a new pull request #10195:
URL: https://github.com/apache/pulsar/pull/10195
### Motivation
There are a lot of resource cleanup issues in Pulsar tests. This PR adds
some TestNG listeners to mitigate the problem.
### Modifications
- add TestNG listeners for cleaning up
- Mockito mocking state in all threads
- FastThreadLocal state holding `org.apache.pulsar.*` class instances in
all threads
- add TestNG listener for detecting leaked threads
- This helps noticing and fixing issues caused by threads that are kept
running after the test completes
- rewrite RetryAnalyzer based on TestNG's RetryAnalyzerCount class
- add tests for RetryAnalyzer
- Fix test dependencies in pulsar-io/flume and pulsar-io/netty
- add custom fail fast solution
- Maven Surefire built-in solution is broken with TestNG 7.3.0
- This makes the test retries in CI faster since most test runs are
retries 3 times. It's a waste of resources to keep executing after the first
test failure. (This applies at least for the 2 first runs out of the maximum of
3 runs. It could be useful to disable "fail fast" for the last attempt, however
that is out-of-scope of this PR.)
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]