You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kr...@apache.org on 2011/12/29 09:38:04 UTC
svn commit: r1225473 -
/maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreWrapper.java
Author: krosenvold
Date: Thu Dec 29 08:38:04 2011
New Revision: 1225473
URL: http://svn.apache.org/viewvc?rev=1225473&view=rev
Log:
o Extracted a well named method, removed a comment
Modified:
maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreWrapper.java
Modified: maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreWrapper.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreWrapper.java?rev=1225473&r1=1225472&r2=1225473&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreWrapper.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreWrapper.java Thu Dec 29 08:38:04 2011
@@ -63,16 +63,9 @@ class JUnitCoreWrapper
if ( run.getFailureCount() > 0 )
{
- // There is something interesting going on here;
- // the "run" result can contain other exceptions that did not occur as
- // part of the test run, for instance if something bad happened in the
- // RunListener. But it also contains regular problems from the test-run.
- // I am not entirely sure of what to do with this; it might even be
- // that these errors are the correct errors to report back to the client.
-
for ( Failure failure : run.getFailures() )
{
- if ( failure.getDescription().getDisplayName().equals( "Test mechanism" ) )
+ if ( isFailureInsideJUnitItself( failure ) )
{
final Throwable exception = failure.getException();
throw new TestSetFailedException( exception );
@@ -90,6 +83,11 @@ class JUnitCoreWrapper
}
}
+ private static boolean isFailureInsideJUnitItself( Failure failure )
+ {
+ return failure.getDescription().getDisplayName().equals( "Test mechanism" );
+ }
+
private static void closeIfConfigurable( Computer computer )
throws TestSetFailedException
{