diff --git a/WHATSNEW b/WHATSNEW index f3f61411f..b3775380a 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -173,6 +173,10 @@ Fixed bugs: links from a properties file. Bugzilla Report 50136. + * could allow tasks to start executing even if a task + scheduled to run before them timed out. + Bugzilla Report 49527 + Other changes: -------------- diff --git a/docs/manual/Tasks/parallel.html b/docs/manual/Tasks/parallel.html index ad9a674ec..464b5b9be 100644 --- a/docs/manual/Tasks/parallel.html +++ b/docs/manual/Tasks/parallel.html @@ -79,7 +79,7 @@ failonany If any of the nested tasks fails, execution of the task completes at that point without waiting for any other tasks to complete. - No + No, default is false. pollInterval diff --git a/src/main/org/apache/tools/ant/taskdefs/Parallel.java b/src/main/org/apache/tools/ant/taskdefs/Parallel.java index 3bfbecffa..a1ffd6a2e 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Parallel.java +++ b/src/main/org/apache/tools/ant/taskdefs/Parallel.java @@ -350,7 +350,10 @@ public class Parallel extends Task interrupted = true; } - killAll(running); + if (!timedOut && !failOnAny) { + // https://issues.apache.org/bugzilla/show_bug.cgi?id=49527 + killAll(running); + } } if (interrupted) { diff --git a/src/tests/antunit/taskdefs/parallel-test.xml b/src/tests/antunit/taskdefs/parallel-test.xml new file mode 100644 index 000000000..72e4828d7 --- /dev/null +++ b/src/tests/antunit/taskdefs/parallel-test.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file