Updated Branches: refs/heads/master dd13e351d -> 886501d6d
o Reset state, upped testcase Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/886501d6 Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/886501d6 Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/886501d6 Branch: refs/heads/master Commit: 886501d6dc5db4e23d08e01468df089ab714587a Parents: dd13e35 Author: Kristian Rosenvold <krosenv...@apache.org> Authored: Sat Dec 22 16:43:20 2012 +0100 Committer: Kristian Rosenvold <krosenv...@apache.org> Committed: Sat Dec 22 16:43:20 2012 +0100 ---------------------------------------------------------------------- .../surefire/report/TestSuiteXmlParser.java | 4 +++- .../surefire/report/TestSuiteXmlParserTest.java | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/886501d6/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/TestSuiteXmlParser.java ---------------------------------------------------------------------- diff --git a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/TestSuiteXmlParser.java b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/TestSuiteXmlParser.java index acc0256..c2d8ee5 100644 --- a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/TestSuiteXmlParser.java +++ b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/TestSuiteXmlParser.java @@ -62,7 +62,7 @@ public class TestSuiteXmlParser private ReportTestCase testCase; - private boolean valid = true; + private boolean valid; public Collection<ReportTestSuite> parse( String xmlPath ) throws ParserConfigurationException, SAXException, IOException @@ -89,6 +89,8 @@ public class TestSuiteXmlParser SAXParser saxParser = factory.newSAXParser(); + valid = true; + classesToSuites = new HashMap<String, ReportTestSuite>(); saxParser.parse( stream, this ); http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/886501d6/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/TestSuiteXmlParserTest.java ---------------------------------------------------------------------- diff --git a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/TestSuiteXmlParserTest.java b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/TestSuiteXmlParserTest.java index 344eb02..0b8c871 100644 --- a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/TestSuiteXmlParserTest.java +++ b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/TestSuiteXmlParserTest.java @@ -96,7 +96,7 @@ public class TestSuiteXmlParserTest } - public void testParserHitsSum() + public void testParserHitsFailsafeSummary() throws IOException, SAXException, ParserConfigurationException { TestSuiteXmlParser parser = new TestSuiteXmlParser(); @@ -104,6 +104,11 @@ public class TestSuiteXmlParserTest parser.parse( "src/test/resources/fixture/testsuitexmlparser/failsafe-summary.xml" ); assertFalse( parser.isValid() ); + + parser.parse( + "src/test/resources/fixture/testsuitexmlparser/TEST-org.apache.maven.surefire.test.FailingTest.xml" ); + + assertTrue( parser.isValid() ); }