You are viewing a plain text version of this content. The canonical link for it is here.
Posted to surefire-commits@maven.apache.org by kr...@apache.org on 2011/03/15 18:07:22 UTC
svn commit: r1081861 -
/maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreWrapper.java
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() );
}
}
}