mirror of https://github.com/apache/activemq.git
disable autofail system.exit - it kills a surefire forked test run
This commit is contained in:
parent
845e62af76
commit
785faa06be
|
@ -80,7 +80,11 @@ public abstract class AutoFailTestSupport extends TestCase {
|
||||||
if (!isTestSuccess.get()) {
|
if (!isTestSuccess.get()) {
|
||||||
LOG.error("Test case has exceeded the maximum allotted time to run of: " + getMaxTestTime() + " ms.");
|
LOG.error("Test case has exceeded the maximum allotted time to run of: " + getMaxTestTime() + " ms.");
|
||||||
dumpAllThreads(getName());
|
dumpAllThreads(getName());
|
||||||
System.exit(EXIT_ERROR);
|
if (System.getProperty("org.apache.activemq.AutoFailTestSupport.disableSystemExit") == null) {
|
||||||
|
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");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,10 +29,6 @@
|
||||||
<name>ActiveMQ :: Unit Tests</name>
|
<name>ActiveMQ :: Unit Tests</name>
|
||||||
<description>The ActiveMQ Message Broker and Client Unit Tests</description>
|
<description>The ActiveMQ Message Broker and Client Unit Tests</description>
|
||||||
|
|
||||||
<properties>
|
|
||||||
<surefire.argLine>-Xmx512M -Djava.awt.headless=true</surefire.argLine>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<!-- =============================== -->
|
<!-- =============================== -->
|
||||||
|
@ -441,7 +437,7 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<forkCount>1</forkCount>
|
<forkCount>1</forkCount>
|
||||||
<reuseForks>false</reuseForks>
|
<reuseForks>false</reuseForks>
|
||||||
<argLine>${surefire.argLine}</argLine>
|
<forkedProcessTimeoutInSeconds>600</forkedProcessTimeoutInSeconds>
|
||||||
<runOrder>alphabetical</runOrder>
|
<runOrder>alphabetical</runOrder>
|
||||||
<excludes>
|
<excludes>
|
||||||
<!-- temporarily exclude failing tests so that CI works; fix asap and reenable -->
|
<!-- temporarily exclude failing tests so that CI works; fix asap and reenable -->
|
||||||
|
@ -451,23 +447,10 @@
|
||||||
<exclude>**/RoundRobinDispatchPolicyTest.java</exclude>
|
<exclude>**/RoundRobinDispatchPolicyTest.java</exclude>
|
||||||
<exclude>**/SimpleDispatchPolicyTest.java</exclude>
|
<exclude>**/SimpleDispatchPolicyTest.java</exclude>
|
||||||
</excludes>
|
</excludes>
|
||||||
<systemProperties>
|
<systemPropertyVariables>
|
||||||
<property>
|
<org.apache.activemq.default.directory.prefix>target</org.apache.activemq.default.directory.prefix>
|
||||||
<name>org.apache.activemq.default.directory.prefix</name>
|
<org.apache.activemq.AutoFailTestSupport.disableSystemExit>true</org.apache.activemq.AutoFailTestSupport.disableSystemExit>
|
||||||
<value>target/</value>
|
</systemPropertyVariables>
|
||||||
</property>
|
|
||||||
<!-- Uncomment the following if you want to configure custom logging (using src/test/resources/log4j.properties)
|
|
||||||
while running mvn:test
|
|
||||||
Note: if you want to see log messages on the console window remove
|
|
||||||
"redirectTestOutputToFile" from the parent pom
|
|
||||||
-->
|
|
||||||
<!--
|
|
||||||
<property>
|
|
||||||
<name>log4j.configuration</name>
|
|
||||||
<value>file:target/test-classes/log4j.properties</value>
|
|
||||||
</property>
|
|
||||||
-->
|
|
||||||
</systemProperties>
|
|
||||||
<includes>
|
<includes>
|
||||||
<include>**/*Test.*</include>
|
<include>**/*Test.*</include>
|
||||||
</includes>
|
</includes>
|
||||||
|
|
Loading…
Reference in New Issue