You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2021/02/03 13:16:20 UTC

[maven-invoker] branch master updated: Workaround for MSHARED-867 - to help CI tools with cleanup

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

slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-invoker.git


The following commit(s) were added to refs/heads/master by this push:
     new b9ea337  Workaround for MSHARED-867 - to help CI tools with cleanup
b9ea337 is described below

commit b9ea3371ce880db561aff3c30fc9f870b40c8d28
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Wed Feb 3 10:53:17 2021 +0100

    Workaround for MSHARED-867 - to help CI tools with cleanup
---
 .../java/org/apache/maven/shared/invoker/DefaultInvokerTest.java     | 5 +++++
 .../src/test/java/org/apache/maven/shared/invoker/AppTest.java       | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/maven/shared/invoker/DefaultInvokerTest.java b/src/test/java/org/apache/maven/shared/invoker/DefaultInvokerTest.java
index 6fe7c93..a5aae00 100644
--- a/src/test/java/org/apache/maven/shared/invoker/DefaultInvokerTest.java
+++ b/src/test/java/org/apache/maven/shared/invoker/DefaultInvokerTest.java
@@ -95,6 +95,11 @@ public class DefaultInvokerTest
         // We check the exception to be sure the failure is based on timeout.
         assertEquals( "Error while executing external command, process killed.",
                       result.getExecutionException().getMessage() );
+
+        // WARN - Windows issue MSHARED-867 - Maven and child surefire test process stays alive on Windows
+        // workaround implemented in this test to timeout test after 15 sec
+        // please also check timeout logic in maven-shared-utils
+
         // exitCode can't be used cause in case of an timeout it's not correctly
         // set in DefaultInvoker. Need to think about this.
         // assertEquals( 1, result.getExitCode() );
diff --git a/src/test/resources/test-build-should-timeout/src/test/java/org/apache/maven/shared/invoker/AppTest.java b/src/test/resources/test-build-should-timeout/src/test/java/org/apache/maven/shared/invoker/AppTest.java
index c289090..4250429 100644
--- a/src/test/resources/test-build-should-timeout/src/test/java/org/apache/maven/shared/invoker/AppTest.java
+++ b/src/test/resources/test-build-should-timeout/src/test/java/org/apache/maven/shared/invoker/AppTest.java
@@ -31,7 +31,7 @@ public class AppTest
      * Not ending test
      * @throws InterruptedException 
      */
-    @Test
+    @Test( timeout = 7_000 ) // shoudl be killed in 4 sec by Invoker - Workaround for Windows MSHARED-867
     public void testApp() throws InterruptedException
     {
         while ( true )