You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/04/12 13:00:29 UTC

[GitHub] [pulsar] lhotari opened a new pull request #10195: Add TestNG listeners for "fail fast" and resource cleanup

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:
users@infra.apache.org



[GitHub] [pulsar] eolivelli merged pull request #10195: [Tests] Add TestNG listeners for resource cleanup, thread leak detection and "fail fast"

Posted by GitBox <gi...@apache.org>.
eolivelli merged pull request #10195:
URL: https://github.com/apache/pulsar/pull/10195


   


-- 
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:
users@infra.apache.org



[GitHub] [pulsar] lhotari removed a comment on pull request #10195: [Tests] Add TestNG listeners for resource cleanup, thread leak detection and "fail fast"

Posted by GitBox <gi...@apache.org>.
lhotari removed a comment on pull request #10195:
URL: https://github.com/apache/pulsar/pull/10195#issuecomment-817925106






-- 
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:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10195: [Tests] Add TestNG listeners for resource cleanup, thread leak detection and "fail fast"

Posted by GitBox <gi...@apache.org>.
lhotari commented on pull request #10195:
URL: https://github.com/apache/pulsar/pull/10195#issuecomment-818012104


   /pulsarbot run-failure-checks


-- 
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:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10195: [Tests] Add TestNG listeners for resource cleanup, thread leak detection and "fail fast"

Posted by GitBox <gi...@apache.org>.
lhotari commented on pull request #10195:
URL: https://github.com/apache/pulsar/pull/10195#issuecomment-818319315


   /pulsarbot run-failure-checks


-- 
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:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10195: [Tests] Add TestNG listeners for resource cleanup, thread leak detection and "fail fast"

Posted by GitBox <gi...@apache.org>.
lhotari commented on pull request #10195:
URL: https://github.com/apache/pulsar/pull/10195#issuecomment-817925106


   /pulsarbot run-failure-checks


-- 
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:
users@infra.apache.org



[GitHub] [pulsar] lhotari removed a comment on pull request #10195: [Tests] Add TestNG listeners for resource cleanup, thread leak detection and "fail fast"

Posted by GitBox <gi...@apache.org>.
lhotari removed a comment on pull request #10195:
URL: https://github.com/apache/pulsar/pull/10195#issuecomment-818233864


   /pulsarbot run-failure-checks


-- 
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:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10195: [Tests] Add TestNG listeners for resource cleanup, thread leak detection and "fail fast"

Posted by GitBox <gi...@apache.org>.
lhotari commented on pull request #10195:
URL: https://github.com/apache/pulsar/pull/10195#issuecomment-818233864


   /pulsarbot run-failure-checks


-- 
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:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #10195: [Tests] Add TestNG listeners for resource cleanup, thread leak detection and "fail fast"

Posted by GitBox <gi...@apache.org>.
lhotari commented on pull request #10195:
URL: https://github.com/apache/pulsar/pull/10195#issuecomment-817998750


   /pulsarbot run-failure-checks


-- 
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:
users@infra.apache.org