fix merge

Signed-off-by: Olivier Lamy <olamy@apache.org>
This commit is contained in:
Olivier Lamy 2024-09-17 16:20:31 +10:00
parent dd172f58db
commit 6f69383188
No known key found for this signature in database
GPG Key ID: 873A8E86B4372146
3 changed files with 19 additions and 29 deletions

View File

@ -278,20 +278,6 @@
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<<<<<<< HEAD
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
=======
>>>>>>> jetty-12.0.x
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<configuration> <configuration>
<systemPropertyVariables combine.children="append"> <systemPropertyVariables combine.children="append">

View File

@ -19,6 +19,7 @@ import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.attribute.FileTime; import java.nio.file.attribute.FileTime;
import java.util.List; import java.util.List;
import java.util.Set;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import org.eclipse.jetty.client.ContentResponse; 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.eclipse.jetty.toolchain.test.FS;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.parallel.Isolated; 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.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -42,8 +45,9 @@ public class DisableUrlCacheTest extends AbstractJettyHomeTest
{ {
private static final Logger LOG = LoggerFactory.getLogger(DisableUrlCacheTest.class); private static final Logger LOG = LoggerFactory.getLogger(DisableUrlCacheTest.class);
@Test @ParameterizedTest
public void testReloadWebAppWithLog4j2() throws Exception @ValueSource(strings = {"ee10", "ee11"})
public void testReloadWebAppWithLog4j2(String env) throws Exception
{ {
Path jettyBase = newTestJettyBaseDirectory(); Path jettyBase = newTestJettyBaseDirectory();
String jettyVersion = System.getProperty("jettyVersion"); String jettyVersion = System.getProperty("jettyVersion");
@ -54,7 +58,7 @@ public class DisableUrlCacheTest extends AbstractJettyHomeTest
.build(); .build();
String[] setupArgs = { 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)) try (JettyHomeTester.Run setupRun = distribution.start(setupArgs))
@ -62,7 +66,7 @@ public class DisableUrlCacheTest extends AbstractJettyHomeTest
assertTrue(setupRun.awaitFor(START_TIMEOUT, TimeUnit.SECONDS)); assertTrue(setupRun.awaitFor(START_TIMEOUT, TimeUnit.SECONDS));
assertEquals(0, setupRun.getExitValue()); 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"); Path testWebApp = distribution.getJettyBase().resolve("webapps/test.war");
Files.copy(webApp, testWebApp); Files.copy(webApp, testWebApp);
@ -74,16 +78,15 @@ public class DisableUrlCacheTest extends AbstractJettyHomeTest
FS.ensureEmpty(resourcesDir); FS.ensureEmpty(resourcesDir);
Path webappsDir = distribution.getJettyBase().resolve("webapps"); Path webappsDir = distribution.getJettyBase().resolve("webapps");
String warXml = """ String warXml =
<?xml version="1.0" encoding="ISO-8859-1"?> "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>" +
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://jetty.org/configure_10_0.dtd"> "<!DOCTYPE Configure PUBLIC \"-//Jetty//Configure//EN\" \"https://jetty.org/configure_10_0.dtd\">" +
<Configure class="org.eclipse.jetty.ee10.webapp.WebAppContext"> "<Configure class=\"org.eclipse.jetty."+env+".webapp.WebAppContext\">" +
<Set name="contextPath">/test</Set> " <Set name=\"contextPath\">/test</Set>" +
<Set name="war"><Property name="jetty.webapps"/>/test.war</Set> " <Set name=\"war\"><Property name=\"jetty.webapps\"/>/test.war</Set>" +
<Set name="tempDirectory"><Property name="jetty.base"/>/work/test</Set> " <Set name=\"tempDirectory\"><Property name=\"jetty.base\"/>/work/test</Set>" +
<Set name="tempDirectoryPersistent">false</Set> " <Set name=\"tempDirectoryPersistent\">false</Set>" +
</Configure> "</Configure>";
""";
Path warXmlPath = webappsDir.resolve("test.xml"); Path warXmlPath = webappsDir.resolve("test.xml");
Files.writeString(warXmlPath, warXml, StandardCharsets.UTF_8); Files.writeString(warXmlPath, warXml, StandardCharsets.UTF_8);

View File

@ -116,7 +116,8 @@ public class OpenIdTests extends AbstractJettyHomeTest
{ {
return Stream.of( return Stream.of(
Arguments.of("ee9", "ee9-openid"), Arguments.of("ee9", "ee9-openid"),
Arguments.of("ee10", "openid") Arguments.of("ee10", "openid"),
Arguments.of("ee11", "openid")
); );
} }