log to search for restart can be different depending on eexx
Signed-off-by: Olivier Lamy <olamy@apache.org>
This commit is contained in:
parent
4a0ee278c1
commit
a9513c0ae8
|
@ -21,6 +21,7 @@ import java.nio.file.attribute.FileTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import org.eclipse.jetty.client.ContentResponse;
|
import org.eclipse.jetty.client.ContentResponse;
|
||||||
import org.eclipse.jetty.http.HttpStatus;
|
import org.eclipse.jetty.http.HttpStatus;
|
||||||
|
@ -30,6 +31,8 @@ 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.ParameterizedTest;
|
||||||
|
import org.junit.jupiter.params.provider.Arguments;
|
||||||
|
import org.junit.jupiter.params.provider.MethodSource;
|
||||||
import org.junit.jupiter.params.provider.ValueSource;
|
import org.junit.jupiter.params.provider.ValueSource;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -45,9 +48,17 @@ public class DisableUrlCacheTest extends AbstractJettyHomeTest
|
||||||
{
|
{
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(DisableUrlCacheTest.class);
|
private static final Logger LOG = LoggerFactory.getLogger(DisableUrlCacheTest.class);
|
||||||
|
|
||||||
|
public static Stream<Arguments> tests()
|
||||||
|
{
|
||||||
|
return Stream.of(
|
||||||
|
Arguments.of("ee10", "Started oeje10w.WebAppContext@"),
|
||||||
|
Arguments.of("ee11", "Started oeje11w.WebAppContext@")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
@ParameterizedTest
|
@ParameterizedTest
|
||||||
@ValueSource(strings = {"ee10", "ee11"})
|
@MethodSource("tests")
|
||||||
public void testReloadWebAppWithLog4j2(String env) throws Exception
|
public void testReloadWebAppWithLog4j2(String env, String logToSearch) throws Exception
|
||||||
{
|
{
|
||||||
Path jettyBase = newTestJettyBaseDirectory();
|
Path jettyBase = newTestJettyBaseDirectory();
|
||||||
String jettyVersion = System.getProperty("jettyVersion");
|
String jettyVersion = System.getProperty("jettyVersion");
|
||||||
|
@ -124,7 +135,7 @@ public class DisableUrlCacheTest extends AbstractJettyHomeTest
|
||||||
touch(warXmlPath);
|
touch(warXmlPath);
|
||||||
|
|
||||||
// Wait for reload to start context
|
// Wait for reload to start context
|
||||||
assertTrue(run2.awaitConsoleLogsFor("Started oeje10w.WebAppContext@", START_TIMEOUT, TimeUnit.SECONDS));
|
assertTrue(run2.awaitConsoleLogsFor(logToSearch, START_TIMEOUT, TimeUnit.SECONDS));
|
||||||
// wait for deployer node to complete so context is Started not Starting
|
// wait for deployer node to complete so context is Started not Starting
|
||||||
assertTrue(run2.awaitConsoleLogsFor("Executing Node Node[started]", START_TIMEOUT, TimeUnit.SECONDS));
|
assertTrue(run2.awaitConsoleLogsFor("Executing Node Node[started]", START_TIMEOUT, TimeUnit.SECONDS));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue