From d9a6fc9d7446d3b81fe81c97e9df07d58cb2ba39 Mon Sep 17 00:00:00 2001 From: Tomasz Kowalczewski Date: Fri, 28 Apr 2023 13:29:36 +0200 Subject: [PATCH 1/3] Removed logging of "Running " for each test being executed. --- .../ant/taskdefs/optional/junitlauncher/LauncherSupport.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LauncherSupport.java b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LauncherSupport.java index e3138001a1..341eb71aa4 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LauncherSupport.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LauncherSupport.java @@ -649,11 +649,8 @@ private Listener(final PrintStream originalSysOut) { @Override public void executionStarted(final TestIdentifier testIdentifier) { super.executionStarted(testIdentifier); - AbstractJUnitResultFormatter.isTestClass(testIdentifier).ifPresent(testClass -> - this.originalSysOut.println("Running " + testClass.getClassName())); } - private static final double ONE_SECOND = 1000.0; // We use this only in the testPlanExecutionFinished method, which // as per the JUnit5 platform semantics won't be called concurrently From 6af32c2bda5e0db36850913cf43e3ad8874831d0 Mon Sep 17 00:00:00 2001 From: Tomasz Kowalczewski Date: Fri, 2 Aug 2024 15:38:12 +0200 Subject: [PATCH 2/3] Issue SIGKILL instead of SIGINT to the monitored process. --- src/main/org/apache/tools/ant/taskdefs/ExecuteWatchdog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/ExecuteWatchdog.java b/src/main/org/apache/tools/ant/taskdefs/ExecuteWatchdog.java index 7a29668fee..e62662afde 100644 --- a/src/main/org/apache/tools/ant/taskdefs/ExecuteWatchdog.java +++ b/src/main/org/apache/tools/ant/taskdefs/ExecuteWatchdog.java @@ -125,7 +125,7 @@ public synchronized void timeoutOccured(Watchdog w) { // a timeout and not a manual stop then kill it. if (watch) { killedProcess = true; - process.destroy(); + process.destroyForcibly(); } } } catch (Exception e) { From 949a5bb0ee7e687f4d6f9cc01d6d61d4f8779e56 Mon Sep 17 00:00:00 2001 From: Tomasz Kowalczewski Date: Fri, 2 Aug 2024 15:38:55 +0200 Subject: [PATCH 3/3] Reverting changes. --- .../ant/taskdefs/optional/junitlauncher/LauncherSupport.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LauncherSupport.java b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LauncherSupport.java index 341eb71aa4..e3138001a1 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LauncherSupport.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LauncherSupport.java @@ -649,8 +649,11 @@ private Listener(final PrintStream originalSysOut) { @Override public void executionStarted(final TestIdentifier testIdentifier) { super.executionStarted(testIdentifier); + AbstractJUnitResultFormatter.isTestClass(testIdentifier).ifPresent(testClass -> + this.originalSysOut.println("Running " + testClass.getClassName())); } + private static final double ONE_SECOND = 1000.0; // We use this only in the testPlanExecutionFinished method, which // as per the JUnit5 platform semantics won't be called concurrently