]
Dan Berindei updated ISPN-10106:
--------------------------------
Git Pull Request:
Fix thread leaks in JUnit modules
---------------------------------
Key: ISPN-10106
URL:
https://issues.jboss.org/browse/ISPN-10106
Project: Infinispan
Issue Type: Bug
Components: Test Suite - Server
Affects Versions: 9.4.11.Final, 10.0.0.Beta3
Reporter: Dan Berindei
Assignee: Dan Berindei
Priority: Major
Labels: testsuite_stability
Fix For: 10.0.0.Beta4
ISPN-9863 added a thread leak checker, but even with all the recent improvements, leaks
in JUnit modules are not reported as test failures.
Because Surefire ignores failures in JUnit configuration methods and listeners, the only
sign of a leak is an error message in the console output:
{noformat}
[2019-03-28T17:33:54.119Z] org.apache.maven.surefire.booter.SurefireBooterForkException:
ExecutionException There was an error in the forked process
[2019-03-28T17:33:54.119Z] Test mechanism :: Leaked threads:
[2019-03-28T17:33:54.119Z] {pool-7-thread-1: possible sources [UNKNOWN]},
[2019-03-28T17:33:54.119Z] {management-client-thread 1-1: possible sources [UNKNOWN]}
{noformat}
And in a dump file:
{noformat}
[2019-03-28T18:23:39.501Z]
./integrationtests/security-it/target/failsafe-reports/2019-03-28T17-28-10_213-jvmRun1.dump
[2019-03-28T18:23:39.501Z] # Created at 2019-03-28T17:29:25.623
[2019-03-28T18:23:39.501Z] org.apache.maven.surefire.testset.TestSetFailedException: Test
mechanism :: Leaked threads:
[2019-03-28T18:23:39.501Z] {pool-7-thread-1: possible sources [UNKNOWN]},
[2019-03-28T18:23:39.501Z] {management-client-thread 1-1: possible sources [UNKNOWN]}
[2019-03-28T18:23:39.501Z] at
org.apache.maven.surefire.common.junit4.JUnit4RunListener.rethrowAnyTestMechanismFailures(JUnit4RunListener.java:223)
{noformat}