From 7ff3ab18465cfcd1ca4c28b14b8d738d1255f3ca Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 27 Sep 2023 08:11:43 -0400 Subject: [PATCH] update maven-shared-utils to 3.4.2 --- pom.xml | 2 +- .../apache/maven/shared/invoker/DefaultInvokerTest.java | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 587dad2..751dfdf 100644 --- a/pom.xml +++ b/pom.xml @@ -85,7 +85,7 @@ under the License. org.apache.maven.shared maven-shared-utils - 3.3.4 + 3.4.2 javax.inject 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 cccb51a..b0d9f28 100644 --- a/src/test/java/org/apache/maven/shared/invoker/DefaultInvokerTest.java +++ b/src/test/java/org/apache/maven/shared/invoker/DefaultInvokerTest.java @@ -31,6 +31,7 @@ import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; public class DefaultInvokerTest { @@ -84,15 +85,13 @@ public void testBuildShouldTimeout() throws MavenInvocationException, URISyntaxE InvocationResult result = invoker.execute(request); // We check the exception to be sure the failure is based on timeout. - assertEquals( - "Error while executing external command, process killed.", - result.getExecutionException().getMessage()); + assertTrue(result.getExecutionException().getMessage().contains("timed out")); // 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 + // exitCode can't be used because in case of a timeout it's not correctly // set in DefaultInvoker. Need to think about this. // assertEquals( 1, result.getExitCode() ); }