You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mf...@apache.org on 2016/01/10 21:36:29 UTC
maven-surefire git commit: SUREFIRE-1217: Extract factory method for
StatelessXmlReporter.
Repository: maven-surefire
Updated Branches:
refs/heads/SUREFIRE-1217 1022ac40f -> a5275e92d
SUREFIRE-1217: Extract factory method for StatelessXmlReporter.
Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/a5275e92
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/a5275e92
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/a5275e92
Branch: refs/heads/SUREFIRE-1217
Commit: a5275e92d782dae2e0ceb0539d80143cd1e7f0c0
Parents: 1022ac4
Author: Mirko Friedenhagen <mf...@apache.org>
Authored: Sun Jan 10 21:36:18 2016 +0100
Committer: Mirko Friedenhagen <mf...@apache.org>
Committed: Sun Jan 10 21:36:18 2016 +0100
----------------------------------------------------------------------
.../report/StatelessXmlReporterTest.java | 24 ++++++++------------
1 file changed, 9 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/a5275e92/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporterTest.java
----------------------------------------------------------------------
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporterTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporterTest.java
index 643a291..c710a7e 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporterTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporterTest.java
@@ -84,7 +84,7 @@ public class StatelessXmlReporterTest
public void testFileNameWithoutSuffix()
{
StatelessXmlReporter reporter =
- createStatelessXmlReporter();
+ createStatelessXmlReporter(0);
reporter.cleanTestHistoryMap();
ReportEntry reportEntry = new SimpleReportEntry( getClass().getName(), getClass().getName(), 12 );
@@ -98,12 +98,6 @@ public class StatelessXmlReporterTest
expectedReportFile.exists() );
}
- StatelessXmlReporter createStatelessXmlReporter() {
- return new StatelessXmlReporter( reportDir, null, false, 0,
- new ConcurrentHashMap<String, Map<String, List<WrappedReportEntry>>>() );
- }
-
-
public void testAllFieldsSerialized()
throws IOException
{
@@ -141,8 +135,7 @@ public class StatelessXmlReporterTest
ReportEntryType.ERROR, 13, stdOut, stdErr );
stats.testSucceeded( t2 );
- StatelessXmlReporter reporter = new StatelessXmlReporter( reportDir, null, false, 0,
- new ConcurrentHashMap<String, Map<String, List<WrappedReportEntry>>>() );
+ StatelessXmlReporter reporter = createStatelessXmlReporter(0);
reporter.testSetCompleted( testSetReportEntry, stats );
FileInputStream fileInputStream = new FileInputStream( expectedReportFile );
@@ -175,6 +168,7 @@ public class StatelessXmlReporterTest
assertEquals( stdErrPrefix + "?&-&£ &#0;&#31;", tcb.getChild( "system-err" ).getValue() );
}
+
public void testOutputRerunFlakyFailure()
throws IOException
{
@@ -220,12 +214,7 @@ public class StatelessXmlReporterTest
rerunStats.testSucceeded( testTwoSecondError );
rerunStats.testSucceeded( testThreeSecondRun );
- StatelessXmlReporter reporter =
- new StatelessXmlReporter( reportDir,
- null,
- false,
- 1,
- new HashMap<String, Map<String, List<WrappedReportEntry>>>() );
+ StatelessXmlReporter reporter = createStatelessXmlReporter(1);
reporter.testSetCompleted( testSetReportEntry, stats );
reporter.testSetCompleted( testSetReportEntry, rerunStats );
@@ -283,6 +272,11 @@ public class StatelessXmlReporterTest
assertNull( testCaseThree.getChild( "system-err" ) );
}
+ StatelessXmlReporter createStatelessXmlReporter(int rerunFailingTestCount) {
+ return new StatelessXmlReporter( reportDir, null, false, rerunFailingTestCount,
+ new ConcurrentHashMap<String, Map<String, List<WrappedReportEntry>>>() );
+ }
+
private boolean defaultCharsetSupportsSpecialChar()
{
// some charsets are not able to deal with \u0115 on both ways of the conversion