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 2010/12/15 21:34:30 UTC

svn commit: r1049699 - in /maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient: ForkStarter.java output/FileOutputConsumerProxy.java

Author: krosenvold
Date: Wed Dec 15 20:34:30 2010
New Revision: 1049699

URL: http://svn.apache.org/viewvc?rev=1049699&view=rev
Log:
[SUREFIRE-665] Intermittent failure of logging test output to file

Third thread safety/race issue that has been found in surefire since PLXUTILS-131, the empty catch block was removed in
plexus-utils. No more hiding this stuff under the carpet

Modified:
    maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java
    maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/FileOutputConsumerProxy.java

Modified: maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java?rev=1049699&r1=1049698&r2=1049699&view=diff
==============================================================================
--- maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java (original)
+++ maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java Wed Dec 15 20:34:30 2010
@@ -224,7 +224,7 @@ public class ForkStarter
         }
         catch ( CommandLineException e )
         {
-            throw new SurefireBooterForkException( "Error while executing forked tests.", e );
+            throw new SurefireBooterForkException( "Error while executing forked tests.", e.getCause() );
         }
 
         if ( startupConfiguration.isRedirectTestOutputToFile() )

Modified: maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/FileOutputConsumerProxy.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/FileOutputConsumerProxy.java?rev=1049699&r1=1049698&r2=1049699&view=diff
==============================================================================
--- maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/FileOutputConsumerProxy.java (original)
+++ maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/FileOutputConsumerProxy.java Wed Dec 15 20:34:30 2010
@@ -84,7 +84,7 @@ public class FileOutputConsumerProxy
         super.testSetStarting( reportEntry );
     }
 
-    public void testSetCompleted()
+    public synchronized void testSetCompleted()
     {
         if ( printWriter == null )
         {