ARTEMIS-1276 avoid System.exit in tests as Surefire cannot deal with that

This change results in many more tests being run. Previously, 662 tests
were executed. Now, 1166 tests is executed. The running time has increased
from ~20 minutes to ~50 minutes.
This commit is contained in:
Jiri Danek 2017-07-17 11:51:55 +02:00 committed by Clebert Suconic
parent 9647c19e7f
commit 7e9c3fdfb7
2 changed files with 4 additions and 0 deletions

View File

@ -435,6 +435,9 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>${skipActiveMQ5Tests}</skipTests>
<systemPropertyVariables>
<org.apache.activemq.AutoFailTestSupport.disableSystemExit>true</org.apache.activemq.AutoFailTestSupport.disableSystemExit>
</systemPropertyVariables>
<!--
<additionalClasspathElements>
<additionalClasspathElement>src/main/resources/stomp</additionalClasspathElement>

View File

@ -89,6 +89,7 @@ public abstract class AutoFailTestSupport extends TestCase {
System.exit(EXIT_ERROR);
} else {
LOG.error("No system.exit as it kills surefire - forkedProcessTimeoutInSeconds (surefire.timeout) will kick in eventually see pom.xml surefire plugin config");
fail("Timeout in AutoFailTestSupport class has been exceeded");
}
}
}