You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2016/09/19 20:57:59 UTC
[1/3] maven-surefire git commit: [SUREFIRE] refactoring
Repository: maven-surefire
Updated Branches:
refs/heads/master 689291f67 -> 175d1d44b
[SUREFIRE] refactoring
Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/503d72e2
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/503d72e2
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/503d72e2
Branch: refs/heads/master
Commit: 503d72e2fd9896ba597349ea6034830fe7cb461c
Parents: 689291f
Author: Tibor17 <ti...@lycos.com>
Authored: Mon Sep 19 21:59:21 2016 +0200
Committer: Tibor17 <ti...@lycos.com>
Committed: Mon Sep 19 21:59:21 2016 +0200
----------------------------------------------------------------------
.../plugin/surefire/runorder/RunEntryStatisticsMap.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/503d72e2/surefire-api/src/main/java/org/apache/maven/plugin/surefire/runorder/RunEntryStatisticsMap.java
----------------------------------------------------------------------
diff --git a/surefire-api/src/main/java/org/apache/maven/plugin/surefire/runorder/RunEntryStatisticsMap.java b/surefire-api/src/main/java/org/apache/maven/plugin/surefire/runorder/RunEntryStatisticsMap.java
index adc9b6a..47d4e67 100644
--- a/surefire-api/src/main/java/org/apache/maven/plugin/surefire/runorder/RunEntryStatisticsMap.java
+++ b/surefire-api/src/main/java/org/apache/maven/plugin/surefire/runorder/RunEntryStatisticsMap.java
@@ -46,7 +46,7 @@ import static org.apache.maven.plugin.surefire.runorder.RunEntryStatistics.fromS
/**
* @author Kristian Rosenvold
*/
-public class RunEntryStatisticsMap
+public final class RunEntryStatisticsMap
{
private final Map<String, RunEntryStatistics> runEntryStatistics;
@@ -147,7 +147,7 @@ public class RunEntryStatisticsMap
runEntryStatistics.put( item.getTestName(), item );
}
- class RunCountComparator
+ static final class RunCountComparator
implements Comparator<RunEntryStatistics>
{
public int compare( RunEntryStatistics o, RunEntryStatistics o1 )
@@ -235,7 +235,7 @@ public class RunEntryStatisticsMap
return result;
}
- class PrioritizedTestComparator
+ static final class PrioritizedTestComparator
implements Comparator<PrioritizedTest>
{
public int compare( PrioritizedTest o, PrioritizedTest o1 )
@@ -244,7 +244,7 @@ public class RunEntryStatisticsMap
}
}
- class TestRuntimeComparator
+ static final class TestRuntimeComparator
implements Comparator<Priority>
{
public int compare( Priority o, Priority o1 )
@@ -253,7 +253,7 @@ public class RunEntryStatisticsMap
}
}
- class LeastFailureComparator
+ static final class LeastFailureComparator
implements Comparator<Priority>
{
public int compare( Priority o, Priority o1 )
[3/3] maven-surefire git commit: [SUREFIRE-1244]
NumberFormatException in parallel test run with runOrder = failedFirst
Posted by ti...@apache.org.
[SUREFIRE-1244] NumberFormatException in parallel test run with runOrder = failedFirst
Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/175d1d44
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/175d1d44
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/175d1d44
Branch: refs/heads/master
Commit: 175d1d44b629d362e40b650fe8c0a30cb3623774
Parents: 7f14afc
Author: Tibor17 <ti...@lycos.com>
Authored: Mon Sep 19 22:57:35 2016 +0200
Committer: Tibor17 <ti...@lycos.com>
Committed: Mon Sep 19 22:57:35 2016 +0200
----------------------------------------------------------------------
.../plugin/surefire/StartupReportConfiguration.java | 14 ++++++++++----
.../surefire/report/DefaultReporterFactory.java | 2 +-
.../plugin/surefire/runorder/StatisticsReporter.java | 4 ++--
3 files changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/175d1d44/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/StartupReportConfiguration.java
----------------------------------------------------------------------
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/StartupReportConfiguration.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/StartupReportConfiguration.java
index 30156f9..8b1b710 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/StartupReportConfiguration.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/StartupReportConfiguration.java
@@ -45,7 +45,7 @@ import static org.apache.maven.plugin.surefire.report.ConsoleReporter.PLAIN;
*
* @author Kristian Rosenvold
*/
-public class StartupReportConfiguration
+public final class StartupReportConfiguration
{
public static final String BRIEF_REPORT_FORMAT = BRIEF;
@@ -77,13 +77,15 @@ public class StartupReportConfiguration
private final int rerunFailingTestsCount;
- private String xsdSchemaLocation;
+ private final String xsdSchemaLocation;
private final Properties testVmSystemProperties = new Properties();
private final Map<String, Map<String, List<WrappedReportEntry>>> testClassMethodRunHistory
= new ConcurrentHashMap<String, Map<String, List<WrappedReportEntry>>>();
+ private StatisticsReporter statisticsReporter;
+
@SuppressWarnings( "checkstyle:parameternumber" )
public StartupReportConfiguration( boolean useFile, boolean printSummary, String reportFormat,
boolean redirectTestOutputToFile, boolean disableXmlReport,
@@ -195,9 +197,13 @@ public class StartupReportConfiguration
: new DirectConsoleOutput( originalSystemOut, originalSystemErr );
}
- public StatisticsReporter instantiateStatisticsReporter()
+ public synchronized StatisticsReporter getStatisticsReporter()
{
- return requiresRunHistory ? new StatisticsReporter( getStatisticsFile() ) : null;
+ if ( statisticsReporter == null )
+ {
+ statisticsReporter = requiresRunHistory ? new StatisticsReporter( getStatisticsFile() ) : null;
+ }
+ return statisticsReporter;
}
public File getStatisticsFile()
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/175d1d44/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/DefaultReporterFactory.java
----------------------------------------------------------------------
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/DefaultReporterFactory.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/DefaultReporterFactory.java
index b182f71..a2bc7ec 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/DefaultReporterFactory.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/DefaultReporterFactory.java
@@ -82,7 +82,7 @@ public class DefaultReporterFactory
{
this.reportConfiguration = reportConfiguration;
this.consoleLogger = consoleLogger;
- statisticsReporter = reportConfiguration.instantiateStatisticsReporter();
+ statisticsReporter = reportConfiguration.getStatisticsReporter();
listeners = new ConcurrentLinkedQueue<TestSetRunListener>();
}
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/175d1d44/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/runorder/StatisticsReporter.java
----------------------------------------------------------------------
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/runorder/StatisticsReporter.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/runorder/StatisticsReporter.java
index ca33d67..9dd3380 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/runorder/StatisticsReporter.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/runorder/StatisticsReporter.java
@@ -28,7 +28,7 @@ import static org.apache.maven.plugin.surefire.runorder.RunEntryStatisticsMap.fr
/**
* @author Kristian Rosenvold
*/
-public class StatisticsReporter
+public final class StatisticsReporter
{
private final RunEntryStatisticsMap existing;
@@ -43,7 +43,7 @@ public class StatisticsReporter
newResults = new RunEntryStatisticsMap();
}
- public void testSetCompleted()
+ public synchronized void testSetCompleted()
{
try
{
[2/3] maven-surefire git commit: [SUREFIRE] refactoring
Posted by ti...@apache.org.
[SUREFIRE] refactoring
Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/7f14afc3
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/7f14afc3
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/7f14afc3
Branch: refs/heads/master
Commit: 7f14afc33c31b93acf7552597cbe713b535a8bc2
Parents: 503d72e
Author: Tibor17 <ti...@lycos.com>
Authored: Mon Sep 19 22:17:15 2016 +0200
Committer: Tibor17 <ti...@lycos.com>
Committed: Mon Sep 19 22:17:15 2016 +0200
----------------------------------------------------------------------
.../maven/plugin/surefire/runorder/RunEntryStatisticsMap.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/7f14afc3/surefire-api/src/main/java/org/apache/maven/plugin/surefire/runorder/RunEntryStatisticsMap.java
----------------------------------------------------------------------
diff --git a/surefire-api/src/main/java/org/apache/maven/plugin/surefire/runorder/RunEntryStatisticsMap.java b/surefire-api/src/main/java/org/apache/maven/plugin/surefire/runorder/RunEntryStatisticsMap.java
index 47d4e67..d47e803 100644
--- a/surefire-api/src/main/java/org/apache/maven/plugin/surefire/runorder/RunEntryStatisticsMap.java
+++ b/surefire-api/src/main/java/org/apache/maven/plugin/surefire/runorder/RunEntryStatisticsMap.java
@@ -205,7 +205,7 @@ public final class RunEntryStatisticsMap
return result;
}
- public Map getPriorities( Comparator<Priority> priorityComparator )
+ private Map getPriorities( Comparator<Priority> priorityComparator )
{
Map<String, Priority> priorities = new HashMap<String, Priority>();
for ( Object o : runEntryStatistics.keySet() )