maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krosenv...@apache.org
Subject svn commit: r1100802 - in /maven/surefire/trunk: surefire-api/src/main/java/org/apache/maven/surefire/booter/ForkingRunListener.java surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestSet.java
Date Sun, 08 May 2011 20:03:50 GMT
Author: krosenvold
Date: Sun May  8 20:03:50 2011
New Revision: 1100802

URL: http://svn.apache.org/viewvc?rev=1100802&view=rev
Log:
o Fixed problem introduced in r1099367

Modified:
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ForkingRunListener.java
    maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestSet.java

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ForkingRunListener.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ForkingRunListener.java?rev=1100802&r1=1100801&r2=1100802&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ForkingRunListener.java
(original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ForkingRunListener.java
Sun May  8 20:03:50 2011
@@ -28,7 +28,6 @@ import org.apache.maven.surefire.report.
 import org.apache.maven.surefire.report.RunListener;
 import org.apache.maven.surefire.report.StackTraceWriter;
 import org.apache.maven.surefire.util.internal.ByteBuffer;
-import org.apache.maven.surefire.util.internal.StreamUtils;
 import org.apache.maven.surefire.util.internal.StringUtils;
 
 /**
@@ -148,7 +147,7 @@ public class ForkingRunListener
                 {
                     value = "null";
                 }
-                toPropertyString( key, value );
+                target.print( toPropertyString( key, value ));
             }
         }
     }
@@ -161,7 +160,7 @@ public class ForkingRunListener
         int i = StringUtils.escapeJavaStyleString( content, 0, buf, off, len );
         content[i++] = (byte) '\n';
 
-        synchronized ( target )
+        synchronized ( target ) // Questionable synchronization
         {
             target.write( header, 0, header.length );
             target.write( content, 0, i );
@@ -214,16 +213,16 @@ public class ForkingRunListener
         target.flush();
     }
 
-    private void toPropertyString( String key, String value )
+    private String toPropertyString( String key, String value )
     {
-        target.write( BOOTERCODE_SYSPROPS );
-        target.write( ',' );
-        StreamUtils.toHex( target, testSetChannelId );
-        target.write( ',' );
-        StringUtils.escapeJavaStyleString( target, key );
-        target.write( ',' );
-        StringUtils.escapeJavaStyleString( target, value );
-        target.write( '\n' );
+        StringBuffer stringBuffer = new StringBuffer();
+        append( stringBuffer, BOOTERCODE_SYSPROPS ).comma( stringBuffer );
+        append( stringBuffer, Integer.toHexString( testSetChannelId.intValue() ) ).comma(
stringBuffer );
+        StringUtils.escapeJavaStyleString( stringBuffer, key );
+        append( stringBuffer, "," );
+        StringUtils.escapeJavaStyleString( stringBuffer, value );
+        stringBuffer.append( "\n" );
+        return stringBuffer.toString();
     }
 
     private String toString( byte operationCode, ReportEntry reportEntry, Integer testSetChannelId
)

Modified: maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestSet.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestSet.java?rev=1100802&r1=1100801&r2=1100802&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestSet.java
(original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestSet.java
Sun May  8 20:03:50 2011
@@ -24,7 +24,6 @@ import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.maven.surefire.report.ConsoleOutputReceiver;
 import org.apache.maven.surefire.report.ReportEntry;
 import org.apache.maven.surefire.report.RunListener;
 import org.apache.maven.surefire.report.SimpleReportEntry;
@@ -81,7 +80,6 @@ public class TestSet
             for ( TestMethod testMethod : testMethods )
             {
                 testMethod.replay( target );
-                testMethod.getLogicalStream().writeDetails( (ConsoleOutputReceiver) target
);
             }
 
             report = createReportEntry( elapsed );



Mime
View raw message