maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krosenv...@apache.org
Subject svn commit: r1081861 - /maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreWrapper.java
Date Tue, 15 Mar 2011 17:07:22 GMT
Author: krosenvold
Date: Tue Mar 15 17:07:22 2011
New Revision: 1081861

URL: http://svn.apache.org/viewvc?rev=1081861&view=rev
Log:
o Moved closing of computer to before listeners are removed

Picked up problem via githib fork of asf repo (mrenouf/Mark Renouf)

Modified:
    maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreWrapper.java

Modified: maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreWrapper.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreWrapper.java?rev=1081861&r1=1081860&r2=1081861&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreWrapper.java
(original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreWrapper.java
Tue Mar 15 17:07:22 2011
@@ -21,13 +21,14 @@ package org.apache.maven.surefire.junitc
 
 import org.apache.maven.surefire.testset.TestSetFailedException;
 import org.apache.maven.surefire.util.TestsToRun;
-import org.junit.runner.Computer;
-import org.junit.runner.JUnitCore;
-import org.junit.runner.notification.RunListener;
 
 import java.util.List;
 import java.util.concurrent.ExecutionException;
 
+import org.junit.runner.Computer;
+import org.junit.runner.JUnitCore;
+import org.junit.runner.notification.RunListener;
+
 /**
  * Encapsulates access to JUnitCore
  *
@@ -52,11 +53,11 @@ class JUnitCoreWrapper
         }
         finally
         {
+            closeIfConfigurable( computer );
             for ( RunListener runListener : listeners )
             {
                 junitCore.removeListener( runListener );
             }
-            closeIfConfigurable( computer );
         }
     }
 
@@ -95,10 +96,10 @@ class JUnitCoreWrapper
         }
         else
         {
-            return new ConfigurableParallelComputer( jUnitCoreParameters.isParallelClasses(),
-                                                     jUnitCoreParameters.isParallelMethod(),
-                                                     jUnitCoreParameters.getThreadCount(),
-                                                     jUnitCoreParameters.isPerCoreThreadCount()
);
+            return new ConfigurableParallelComputer(
+                jUnitCoreParameters.isParallelClasses() | jUnitCoreParameters.isParallelBoth(),
+                jUnitCoreParameters.isParallelMethod() | jUnitCoreParameters.isParallelBoth(),
+                jUnitCoreParameters.getThreadCount(), jUnitCoreParameters.isPerCoreThreadCount()
);
         }
     }
 }



Mime
View raw message