You are viewing a plain text version of this content. The canonical link for it is here.
Posted to surefire-commits@maven.apache.org by st...@apache.org on 2010/03/16 11:51:45 UTC

svn commit: r923683 - /maven/surefire/trunk/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/IntegrationTestMojo.java

Author: stephenc
Date: Tue Mar 16 10:51:45 2010
New Revision: 923683

URL: http://svn.apache.org/viewvc?rev=923683&view=rev
Log:
[SUREFIRE-604] Submitted by Volkmar Nissen

o Tabs replaced with spaces

o Reformatted to Maven Apache code style

Modified:
    maven/surefire/trunk/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/IntegrationTestMojo.java

Modified: maven/surefire/trunk/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/IntegrationTestMojo.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/IntegrationTestMojo.java?rev=923683&r1=923682&r2=923683&view=diff
==============================================================================
--- maven/surefire/trunk/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/IntegrationTestMojo.java (original)
+++ maven/surefire/trunk/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/IntegrationTestMojo.java Tue Mar 16 10:51:45 2010
@@ -610,11 +610,19 @@ public class IntegrationTestMojo
             }
             catch ( SurefireBooterForkException e )
             {
-                throw new MojoExecutionException( e.getMessage(), e );
+                // Don't stop processing when timeout or other exception occures
+                // Otherwise, the following life cycles (e.g. post-integration-test)
+                // won't be executed
+                result.setResult( SurefireBooter.TESTS_FAILED_EXIT_CODE );
+                result.setException( e.getMessage() );
             }
             catch ( SurefireExecutionException e )
             {
-                throw new MojoExecutionException( e.getMessage(), e );
+                // Don't stop processing when timeout or other exception occures
+                // Otherwise, the following life cycles (e.g. post-integration-test)
+                // won't be executed
+                result.setResult( SurefireBooter.TESTS_FAILED_EXIT_CODE );
+                result.setException( e.getMessage() );
             }
 
             if ( originalSystemProperties != null && !surefireBooter.isForking() )