Repository: maven-surefire Updated Branches: refs/heads/master 4b070aae6 -> 205aba6f7
[SUREFIRE-1159]JUnit47 runner failing in parallel mode Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/205aba6f Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/205aba6f Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/205aba6f Branch: refs/heads/master Commit: 205aba6f701527f8bb05f9592f043d9952d8566d Parents: 4b070aa Author: Tibor17 <tibo...@lycos.com> Authored: Tue May 26 23:42:26 2015 +0200 Committer: Tibor17 <tibo...@lycos.com> Committed: Tue May 26 23:42:26 2015 +0200 ---------------------------------------------------------------------- .../org/apache/maven/surefire/junitcore/TestSet.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/205aba6f/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestSet.java ---------------------------------------------------------------------- diff --git a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestSet.java b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestSet.java index bddbbe4..aa03b97 100644 --- a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestSet.java +++ b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestSet.java @@ -107,9 +107,18 @@ public class TestSet private ReportEntry createReportEntry( Integer elapsed ) { - boolean isJunit3 = testSetDescription.getTestClass() == null; - String classNameToUse = - isJunit3 ? testSetDescription.getChildren().get( 0 ).getClassName() : testSetDescription.getClassName(); + final String className = testSetDescription.getClassName(); + final boolean isJunit3 = className == null; + final String classNameToUse; + if ( isJunit3 ) + { + List<Description> children = testSetDescription.getChildren(); + classNameToUse = children.isEmpty() ? testSetDescription.toString() : children.get( 0 ).getClassName(); + } + else + { + classNameToUse = className; + } return new SimpleReportEntry( classNameToUse, classNameToUse, elapsed ); }