From 6f693831885e6c341937af0cd1741c8a7c0a6807 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Tue, 17 Sep 2024 16:20:31 +1000 Subject: [PATCH] fix merge Signed-off-by: Olivier Lamy --- .../test-distribution-common/pom.xml | 14 --------- .../distribution/DisableUrlCacheTest.java | 31 ++++++++++--------- .../jetty/tests/distribution/OpenIdTests.java | 3 +- 3 files changed, 19 insertions(+), 29 deletions(-) diff --git a/tests/test-distribution/test-distribution-common/pom.xml b/tests/test-distribution/test-distribution-common/pom.xml index 535c035944f..65c35e81de5 100644 --- a/tests/test-distribution/test-distribution-common/pom.xml +++ b/tests/test-distribution/test-distribution-common/pom.xml @@ -278,20 +278,6 @@ org.apache.maven.plugins -<<<<<<< HEAD - maven-jar-plugin - - - - test-jar - - - - - - org.apache.maven.plugins -======= ->>>>>>> jetty-12.0.x maven-surefire-plugin diff --git a/tests/test-distribution/test-distribution-common/src/test/java/org/eclipse/jetty/tests/distribution/DisableUrlCacheTest.java b/tests/test-distribution/test-distribution-common/src/test/java/org/eclipse/jetty/tests/distribution/DisableUrlCacheTest.java index 9b8a2919088..4ca94c4d05b 100644 --- a/tests/test-distribution/test-distribution-common/src/test/java/org/eclipse/jetty/tests/distribution/DisableUrlCacheTest.java +++ b/tests/test-distribution/test-distribution-common/src/test/java/org/eclipse/jetty/tests/distribution/DisableUrlCacheTest.java @@ -19,6 +19,7 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.attribute.FileTime; import java.util.List; +import java.util.Set; import java.util.concurrent.TimeUnit; import org.eclipse.jetty.client.ContentResponse; @@ -28,6 +29,8 @@ import org.eclipse.jetty.tests.testers.Tester; import org.eclipse.jetty.toolchain.test.FS; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.parallel.Isolated; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -42,8 +45,9 @@ public class DisableUrlCacheTest extends AbstractJettyHomeTest { private static final Logger LOG = LoggerFactory.getLogger(DisableUrlCacheTest.class); - @Test - public void testReloadWebAppWithLog4j2() throws Exception + @ParameterizedTest + @ValueSource(strings = {"ee10", "ee11"}) + public void testReloadWebAppWithLog4j2(String env) throws Exception { Path jettyBase = newTestJettyBaseDirectory(); String jettyVersion = System.getProperty("jettyVersion"); @@ -54,7 +58,7 @@ public class DisableUrlCacheTest extends AbstractJettyHomeTest .build(); String[] setupArgs = { - "--add-modules=http,ee10-webapp,ee10-deploy,disable-urlcache" + "--add-modules=http,"+toEnvironment("webapp", env)+","+toEnvironment("deploy", env)+",disable-urlcache" }; try (JettyHomeTester.Run setupRun = distribution.start(setupArgs)) @@ -62,7 +66,7 @@ public class DisableUrlCacheTest extends AbstractJettyHomeTest assertTrue(setupRun.awaitFor(START_TIMEOUT, TimeUnit.SECONDS)); assertEquals(0, setupRun.getExitValue()); - Path webApp = distribution.resolveArtifact("org.eclipse.jetty.ee10:jetty-ee10-test-log4j2-webapp:war:" + jettyVersion); + Path webApp = distribution.resolveArtifact("org.eclipse.jetty."+env+":jetty-"+env+"-test-log4j2-webapp:war:" + jettyVersion); Path testWebApp = distribution.getJettyBase().resolve("webapps/test.war"); Files.copy(webApp, testWebApp); @@ -74,16 +78,15 @@ public class DisableUrlCacheTest extends AbstractJettyHomeTest FS.ensureEmpty(resourcesDir); Path webappsDir = distribution.getJettyBase().resolve("webapps"); - String warXml = """ - - - - /test - /test.war - /work/test - false - - """; + String warXml = + "" + + "" + + "" + + " /test" + + " /test.war" + + " /work/test" + + " false" + + ""; Path warXmlPath = webappsDir.resolve("test.xml"); Files.writeString(warXmlPath, warXml, StandardCharsets.UTF_8); diff --git a/tests/test-distribution/test-distribution-common/src/test/java/org/eclipse/jetty/tests/distribution/OpenIdTests.java b/tests/test-distribution/test-distribution-common/src/test/java/org/eclipse/jetty/tests/distribution/OpenIdTests.java index c96fffe5cff..113500ff6ee 100644 --- a/tests/test-distribution/test-distribution-common/src/test/java/org/eclipse/jetty/tests/distribution/OpenIdTests.java +++ b/tests/test-distribution/test-distribution-common/src/test/java/org/eclipse/jetty/tests/distribution/OpenIdTests.java @@ -116,7 +116,8 @@ public class OpenIdTests extends AbstractJettyHomeTest { return Stream.of( Arguments.of("ee9", "ee9-openid"), - Arguments.of("ee10", "openid") + Arguments.of("ee10", "openid"), + Arguments.of("ee11", "openid") ); }