tkowalcz commented on code in PR #197:
URL: https://github.com/apache/ant/pull/197#discussion_r1071004085
##########
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:
I copied the message as it appears in junit4. I don't have opinion one way
or the other.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]