maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agud...@apache.org
Subject git commit: [SUREFIRE-969] Move printing of parallel configuration from std-out to one-time-only INFO log
Date Fri, 12 Apr 2013 19:02:47 GMT
Updated Branches:
  refs/heads/master 199c61625 -> 8315562ed


[SUREFIRE-969] Move printing of parallel configuration from std-out to one-time-only INFO
log


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

Branch: refs/heads/master
Commit: 8315562ededdbf80f059f843fa34e793b6b25ac7
Parents: 199c616
Author: Andreas Gudian <agudian@apache.org>
Authored: Fri Apr 12 21:02:29 2013 +0200
Committer: Andreas Gudian <agudian@apache.org>
Committed: Fri Apr 12 21:02:29 2013 +0200

----------------------------------------------------------------------
 .../plugin/surefire/AbstractSurefireMojo.java      |   21 ++++++++-------
 .../surefire/junitcore/JUnitCoreParameters.java    |   10 -------
 .../surefire/junitcore/JUnitCoreProvider.java      |    3 --
 3 files changed, 11 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/8315562e/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
----------------------------------------------------------------------
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
index a73c429..c767ea3 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
@@ -975,18 +975,19 @@ public abstract class AbstractSurefireMojo
      */
     private void convertJunitCoreParameters()
     {
-        if ( this.getParallel() != null )
-        {
-            getProperties().setProperty( ProviderParameterNames.PARALLEL_PROP, this.getParallel()
);
-        }
-        if ( this.getThreadCount() > 0 )
-        {
-            getProperties().setProperty( ProviderParameterNames.THREADCOUNT_PROP,
-                                         Integer.toString( this.getThreadCount() ) );
-        }
-        getProperties().setProperty( "reuseForks", Boolean.toString( reuseForks ) );
+        String usedParallel = ( getParallel() != null ) ? getParallel() : "none";
+        String usedThreadCount = ( getThreadCount() > 0 ) ? Integer.toString( getThreadCount()
) : "2";
+
+        getProperties().setProperty( ProviderParameterNames.PARALLEL_PROP, usedParallel );
+        getProperties().setProperty( ProviderParameterNames.THREADCOUNT_PROP, usedThreadCount
);
         getProperties().setProperty( "perCoreThreadCount", Boolean.toString( getPerCoreThreadCount()
) );
         getProperties().setProperty( "useUnlimitedThreads", Boolean.toString( getUseUnlimitedThreads()
) );
+
+        String message =
+            "parallel='" + usedParallel + '\'' + ", perCoreThreadCount=" + getPerCoreThreadCount()
+ ", threadCount="
+                + usedThreadCount + ", useUnlimitedThreads=" + getUseUnlimitedThreads();
+
+        getLog().info( message );
     }
 
     private boolean isJunit47Compatible( Artifact artifact )

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/8315562e/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreParameters.java
----------------------------------------------------------------------
diff --git a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreParameters.java
b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreParameters.java
index 4a7e70c..a2dcea2 100644
--- a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreParameters.java
+++ b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreParameters.java
@@ -35,8 +35,6 @@ class JUnitCoreParameters
 
     private final Boolean useUnlimitedThreads;
 
-    private final boolean reuseForks;
-
     public static final String PARALLEL_KEY = ProviderParameterNames.PARALLEL_PROP;
 
     public static final String PERCORETHREADCOUNT_KEY = "perCoreThreadCount";
@@ -45,15 +43,12 @@ class JUnitCoreParameters
 
     public static final String USEUNLIMITEDTHREADS_KEY = "useUnlimitedThreads";
 
-    public static final String REUSEFORKS_KEY = "reuseForks";
-
     public JUnitCoreParameters( Properties properties )
     {
         this.parallel = properties.getProperty( PARALLEL_KEY, "none" ).toLowerCase();
         this.perCoreThreadCount = Boolean.valueOf( properties.getProperty( PERCORETHREADCOUNT_KEY,
"true" ) );
         this.threadCount = Integer.valueOf( properties.getProperty( THREADCOUNT_KEY, "2"
) );
         this.useUnlimitedThreads = Boolean.valueOf( properties.getProperty( USEUNLIMITEDTHREADS_KEY,
"false" ) );
-        this.reuseForks = Boolean.valueOf( properties.getProperty( REUSEFORKS_KEY, "false"
) );
     }
 
     public boolean isParallelMethod()
@@ -96,11 +91,6 @@ class JUnitCoreParameters
         return !isNoThreading();
     }
 
-    public boolean isReuseForks()
-    {
-        return reuseForks;
-    }
-
     @Override
     public String toString()
     {

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/8315562e/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java
----------------------------------------------------------------------
diff --git a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java
b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java
index 075216d..11e9d9a 100644
--- a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java
+++ b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java
@@ -107,12 +107,9 @@ public class JUnitCoreProvider
     public RunResult invoke( Object forkTestSet )
         throws TestSetFailedException, ReporterException
     {
-        final String message = jUnitCoreParameters.toString() + "\n";
-
         final ReporterFactory reporterFactory = providerParameters.getReporterFactory();
 
         final ConsoleLogger consoleLogger = providerParameters.getConsoleLogger();
-        consoleLogger.info( message );
 
         Filter filter = jUnit48Reflector.isJUnit48Available() ? createJUnit48Filter() : null;
 


Mime
View raw message