Repository: activemq
Updated Branches:
  refs/heads/trunk 845e62af7 -> 27b3a7c34


disable autofail system.exit - it kills a surefire forked test run


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/785faa06
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/785faa06
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/785faa06

Branch: refs/heads/trunk
Commit: 785faa06be29a6075ef47556a89bc3f8a748d4aa
Parents: 845e62a
Author: gtully <gary.tu...@gmail.com>
Authored: Mon Jun 9 12:23:28 2014 +0100
Committer: gtully <gary.tu...@gmail.com>
Committed: Mon Jun 9 12:32:32 2014 +0100

----------------------------------------------------------------------
 .../apache/activemq/AutoFailTestSupport.java    |  6 ++++-
 activemq-unit-tests/pom.xml                     | 27 ++++----------------
 2 files changed, 10 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/785faa06/activemq-broker/src/test/java/org/apache/activemq/AutoFailTestSupport.java
----------------------------------------------------------------------
diff --git 
a/activemq-broker/src/test/java/org/apache/activemq/AutoFailTestSupport.java 
b/activemq-broker/src/test/java/org/apache/activemq/AutoFailTestSupport.java
index e5401d9..12fdff0 100644
--- a/activemq-broker/src/test/java/org/apache/activemq/AutoFailTestSupport.java
+++ b/activemq-broker/src/test/java/org/apache/activemq/AutoFailTestSupport.java
@@ -80,7 +80,11 @@ public abstract class AutoFailTestSupport extends TestCase {
                     if (!isTestSuccess.get()) {
                         LOG.error("Test case has exceeded the maximum allotted 
time to run of: " + getMaxTestTime() + " ms.");
                         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");
+                        }
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/activemq/blob/785faa06/activemq-unit-tests/pom.xml
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/pom.xml b/activemq-unit-tests/pom.xml
index f4eb9a1..ed97bac 100755
--- a/activemq-unit-tests/pom.xml
+++ b/activemq-unit-tests/pom.xml
@@ -29,10 +29,6 @@
   <name>ActiveMQ :: Unit Tests</name>
   <description>The ActiveMQ Message Broker and Client Unit Tests</description>
 
-  <properties>
-    <surefire.argLine>-Xmx512M -Djava.awt.headless=true</surefire.argLine>
-  </properties>
-
   <dependencies>
 
     <!-- =============================== -->
@@ -441,7 +437,7 @@
         <configuration>
           <forkCount>1</forkCount>
           <reuseForks>false</reuseForks>
-          <argLine>${surefire.argLine}</argLine>
+          <forkedProcessTimeoutInSeconds>600</forkedProcessTimeoutInSeconds>
           <runOrder>alphabetical</runOrder>
           <excludes>
             <!-- temporarily exclude failing tests so that CI works; fix asap 
and reenable -->
@@ -451,23 +447,10 @@
             <exclude>**/RoundRobinDispatchPolicyTest.java</exclude>
             <exclude>**/SimpleDispatchPolicyTest.java</exclude>
           </excludes>
-          <systemProperties>
-            <property>
-              <name>org.apache.activemq.default.directory.prefix</name>
-              <value>target/</value>
-            </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>
+          <systemPropertyVariables>
+            
<org.apache.activemq.default.directory.prefix>target</org.apache.activemq.default.directory.prefix>
+            
<org.apache.activemq.AutoFailTestSupport.disableSystemExit>true</org.apache.activemq.AutoFailTestSupport.disableSystemExit>
+          </systemPropertyVariables>
           <includes>
             <include>**/*Test.*</include>
           </includes>

Reply via email to