You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kr...@apache.org on 2012/12/16 17:27:19 UTC

git commit: [SUREFIRE-937] Intermittent incorrect testcount in parallel junit provider

Updated Branches:
  refs/heads/master b80783fa9 -> 5b56fe700


[SUREFIRE-937] Intermittent incorrect testcount in parallel junit provider


Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/5b56fe70
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/5b56fe70
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/5b56fe70

Branch: refs/heads/master
Commit: 5b56fe7002eb0671ef2035cd39adfb7a89bba5a5
Parents: b80783f
Author: Kristian Rosenvold <kr...@apache.org>
Authored: Sun Dec 16 16:52:39 2012 +0100
Committer: Kristian Rosenvold <kr...@apache.org>
Committed: Sun Dec 16 17:08:52 2012 +0100

----------------------------------------------------------------------
 .../junitcore/ConcurrentReporterManager.java       |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/5b56fe70/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManager.java
----------------------------------------------------------------------
diff --git a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManager.java b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManager.java
index 9429310..777f50b 100644
--- a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManager.java
+++ b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManager.java
@@ -71,6 +71,7 @@ public abstract class ConcurrentReporterManager
         {
             testSet.replay( reporterManager );
         }
+        detachTestMethodFromThread();
         reporterManagerThreadLocal.remove();
     }
 
@@ -81,6 +82,7 @@ public abstract class ConcurrentReporterManager
         {
             testMethod.testFailure( failure );
         }
+        detachTestMethodFromThread();
     }
 
     public void testError( ReportEntry failure )
@@ -90,6 +92,7 @@ public abstract class ConcurrentReporterManager
         {
             testMethod.testError( failure );
         }
+        detachTestMethodFromThread();
     }
 
     public void testSkipped( ReportEntry description )
@@ -98,6 +101,7 @@ public abstract class ConcurrentReporterManager
         TestMethod testMethod = getTestSet( description ).createTestMethod( description );
         testMethod.testIgnored( description );
         testSet.incrementFinishedTests( getRunListener(), reportImmediately );
+        detachTestMethodFromThread();
     }
 
     public void testAssumptionFailure( ReportEntry failure )
@@ -107,6 +111,7 @@ public abstract class ConcurrentReporterManager
         {
             testMethod.testIgnored( failure );
         }
+        detachTestMethodFromThread();
     }
 
     public void testStarting( ReportEntry description )