-
Bug
-
Resolution: Done
-
Major
-
9.4.11.Final, 10.0.0.Final
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:
[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]}
And in a dump file:
[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)
- relates to
-
ISPN-9863 Testsuite leaks threads
- Closed