jaikiran commented on code in PR #197:
URL: https://github.com/apache/ant/pull/197#discussion_r1068816591


##########
src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/confined/JUnitLauncherTask.java:
##########
@@ -330,7 +330,20 @@ private void forkTest(final TestDefinition test) {
                 break;
             }
             case Constants.FORK_EXIT_CODE_TIMED_OUT: {
-                throw new BuildException(new TimeoutException("Forked test(s) 
timed out"));
+                // test has failure(s)
+                try {
+                    if (test.getFailureProperty() != null) {
+                        // if there are test failures and the test is 
configured to set a property in case
+                        // of failure, then set the property to true
+                        
this.getProject().setNewProperty(test.getFailureProperty(), "true");
+                    }
+                } finally {
+                    if (test.isHaltOnFailure()) {
+                        throw new BuildException(new TimeoutException("Forked 
test(s) timed out"));
+                    } else {
+                        log("Timeout occurred. Please note the time in the 
report does not reflect the time until the timeout.");

Review Comment:
   Perhaps remove the report part from this log message and instead just say 
`log("Some test(s) timed out")`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org

Reply via email to