This is an automated email from the ASF dual-hosted git repository.

jaikiran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git


The following commit(s) were added to refs/heads/master by this push:
     new e6ab7d0  Make Watchdog for JUnitLauncherTask customizable.
e6ab7d0 is described below

commit e6ab7d025f2685b954c8ecf78811d314067d3b1b
Author: Aleksei Zotov <azotc...@gmail.com>
AuthorDate: Fri Apr 30 12:16:29 2021 +0400

    Make Watchdog for JUnitLauncherTask customizable.
    
    This closes #147 pull request at github/apache/ant repo.
---
 CONTRIBUTORS                                                  |  1 +
 WHATSNEW                                                      | 11 +++++++++++
 contributors.xml                                              |  4 ++++
 .../optional/junitlauncher/confined/JUnitLauncherTask.java    |  7 ++++++-
 4 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 7ac0164..064e6ad 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -8,6 +8,7 @@ Adam Sotona
 Adrian Nistor
 Adrien Grand
 Aleksandr Ishutin
+Alex
 Alex Rosen
 Alexander Grund
 Alexei Yudichev
diff --git a/WHATSNEW b/WHATSNEW
index 7ec8144..d270d90 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -1,6 +1,17 @@
 Changes from Ant 1.10.10 TO Ant 1.10.11
 ======================================
 
+Fixed bugs:
+-----------
+
+
+Other changes:
+--------------
+
+ * 
org.apache.tools.ant.taskdefs.optional.junitlauncher.confined.JUnitLauncherTask 
now
+   has a new protected createExecuteWatchdog() method for allowing it to be 
overriden.
+   Github Pull Request #147
+
 
 Changes from Ant 1.10.9 TO Ant 1.10.10
 ======================================
diff --git a/contributors.xml b/contributors.xml
index 3904272..cff2bf7 100644
--- a/contributors.xml
+++ b/contributors.xml
@@ -64,6 +64,10 @@
   </name>
   <name>
     <first>Alex</first>
+    <last></last>
+  </name>
+  <name>
+    <first>Alex</first>
     <last>Rosen</last>
   </name>
   <name>
diff --git 
a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/confined/JUnitLauncherTask.java
 
b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/confined/JUnitLauncherTask.java
index fa28844..dbe8a1f 100644
--- 
a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/confined/JUnitLauncherTask.java
+++ 
b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/confined/JUnitLauncherTask.java
@@ -344,7 +344,8 @@ public class JUnitLauncherTask extends Task {
     private int executeForkedTest(final ForkDefinition forkDefinition, final 
CommandlineJava commandlineJava) {
         final LogOutputStream outStream = new LogOutputStream(this, 
Project.MSG_INFO);
         final LogOutputStream errStream = new LogOutputStream(this, 
Project.MSG_WARN);
-        final ExecuteWatchdog watchdog = forkDefinition.getTimeout() > 0 ? new 
ExecuteWatchdog(forkDefinition.getTimeout()) : null;
+        final ExecuteWatchdog watchdog = forkDefinition.getTimeout() > 0
+                ? createExecuteWatchdog(forkDefinition.getTimeout()) : null;
         final Execute execute = new Execute(new PumpStreamHandler(outStream, 
errStream), watchdog);
         execute.setCommandline(commandlineJava.getCommandline());
         execute.setAntRun(getProject());
@@ -365,6 +366,10 @@ public class JUnitLauncherTask extends Task {
         return (watchdog != null && watchdog.killedProcess()) ? 
Constants.FORK_EXIT_CODE_TIMED_OUT : exitCode;
     }
 
+    protected ExecuteWatchdog createExecuteWatchdog(long timeout) {
+        return new ExecuteWatchdog(timeout);
+    }
+
     private java.nio.file.Path newLaunchDefinitionXml() {
         return FileUtils.getFileUtils()
             .createTempFile(getProject(), null, ".xml", null, true, true)

Reply via email to