Merge branch 'jetty-11.0.x' into jetty-12.0.x
This commit is contained in:
commit
56af845cf1
|
@ -47,7 +47,6 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.testcontainers.containers.DatastoreEmulatorContainer;
|
import org.testcontainers.containers.DatastoreEmulatorContainer;
|
||||||
import org.testcontainers.containers.output.Slf4jLogConsumer;
|
import org.testcontainers.containers.output.Slf4jLogConsumer;
|
||||||
import org.testcontainers.containers.wait.strategy.Wait;
|
|
||||||
import org.testcontainers.utility.DockerImageName;
|
import org.testcontainers.utility.DockerImageName;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
@ -65,28 +64,10 @@ public class GCloudSessionTestSupport
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(GCloudSessionTestSupport.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(GCloudSessionTestSupport.class);
|
||||||
private static final Logger GCLOUD_LOG = LoggerFactory.getLogger("org.eclipse.jetty.gcloud.session.gcloudLogs");
|
private static final Logger GCLOUD_LOG = LoggerFactory.getLogger("org.eclipse.jetty.gcloud.session.gcloudLogs");
|
||||||
|
|
||||||
public DatastoreEmulatorContainer emulator = new CustomDatastoreEmulatorContainer(
|
public DatastoreEmulatorContainer emulator = new DatastoreEmulatorContainer(
|
||||||
DockerImageName.parse("gcr.io/google.com/cloudsdktool/cloud-sdk:316.0.0-emulators")
|
DockerImageName.parse("gcr.io/google.com/cloudsdktool/cloud-sdk:316.0.0-emulators")
|
||||||
).withLogConsumer(new Slf4jLogConsumer(GCLOUD_LOG));
|
).withLogConsumer(new Slf4jLogConsumer(GCLOUD_LOG))
|
||||||
|
.withFlags("--consistency=1.0");
|
||||||
private static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName.parse("gcr.io/google.com/cloudsdktool/cloud-sdk");
|
|
||||||
|
|
||||||
private static final String CMD = "gcloud beta emulators datastore start --project test-project --host-port 0.0.0.0:8081 --consistency=1.0";
|
|
||||||
private static final int HTTP_PORT = 8081;
|
|
||||||
|
|
||||||
public static class CustomDatastoreEmulatorContainer extends DatastoreEmulatorContainer
|
|
||||||
{
|
|
||||||
public CustomDatastoreEmulatorContainer(DockerImageName dockerImageName)
|
|
||||||
{
|
|
||||||
super(dockerImageName);
|
|
||||||
|
|
||||||
dockerImageName.assertCompatibleWith(DEFAULT_IMAGE_NAME);
|
|
||||||
|
|
||||||
withExposedPorts(HTTP_PORT);
|
|
||||||
setWaitStrategy(Wait.forHttp("/").forStatusCode(200));
|
|
||||||
withCommand("/bin/sh", "-c", CMD);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class TestGCloudSessionDataStoreFactory extends GCloudSessionDataStoreFactory
|
public static class TestGCloudSessionDataStoreFactory extends GCloudSessionDataStoreFactory
|
||||||
{
|
{
|
||||||
|
|
4
pom.xml
4
pom.xml
|
@ -93,7 +93,9 @@
|
||||||
<plexus-utils.version>3.5.0</plexus-utils.version>
|
<plexus-utils.version>3.5.0</plexus-utils.version>
|
||||||
<slf4j.version>2.0.5</slf4j.version>
|
<slf4j.version>2.0.5</slf4j.version>
|
||||||
<springboot.version>2.1.1.RELEASE</springboot.version>
|
<springboot.version>2.1.1.RELEASE</springboot.version>
|
||||||
<testcontainers.version>1.17.5</testcontainers.version>
|
<taglibs-standard-impl.version>1.2.5</taglibs-standard-impl.version>
|
||||||
|
<taglibs-standard-spec.version>1.2.5</taglibs-standard-spec.version>
|
||||||
|
<testcontainers.version>1.17.6</testcontainers.version>
|
||||||
<weld.version>4.0.3.Final</weld.version>
|
<weld.version>4.0.3.Final</weld.version>
|
||||||
<wildfly.common.version>1.6.0.Final</wildfly.common.version>
|
<wildfly.common.version>1.6.0.Final</wildfly.common.version>
|
||||||
<wildfly.elytron.version>2.0.0.Final</wildfly.elytron.version>
|
<wildfly.elytron.version>2.0.0.Final</wildfly.elytron.version>
|
||||||
|
|
|
@ -23,7 +23,6 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.testcontainers.containers.DatastoreEmulatorContainer;
|
import org.testcontainers.containers.DatastoreEmulatorContainer;
|
||||||
import org.testcontainers.containers.output.Slf4jLogConsumer;
|
import org.testcontainers.containers.output.Slf4jLogConsumer;
|
||||||
import org.testcontainers.containers.wait.strategy.Wait;
|
|
||||||
import org.testcontainers.utility.DockerImageName;
|
import org.testcontainers.utility.DockerImageName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,30 +35,12 @@ public class GCloudSessionDistributionTests extends AbstractSessionDistributionT
|
||||||
private static final Logger GCLOUD_LOG = LoggerFactory.getLogger("org.eclipse.jetty.tests.distribution.session.gcloudLogs");
|
private static final Logger GCLOUD_LOG = LoggerFactory.getLogger("org.eclipse.jetty.tests.distribution.session.gcloudLogs");
|
||||||
|
|
||||||
public DatastoreEmulatorContainer emulator =
|
public DatastoreEmulatorContainer emulator =
|
||||||
new CustomDatastoreEmulatorContainer(DockerImageName.parse("gcr.io/google.com/cloudsdktool/cloud-sdk:316.0.0-emulators"))
|
new DatastoreEmulatorContainer(DockerImageName.parse("gcr.io/google.com/cloudsdktool/cloud-sdk:316.0.0-emulators"))
|
||||||
.withLogConsumer(new Slf4jLogConsumer(GCLOUD_LOG));
|
.withLogConsumer(new Slf4jLogConsumer(GCLOUD_LOG))
|
||||||
|
.withFlags("--consistency=1.0");
|
||||||
private static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName.parse("gcr.io/google.com/cloudsdktool/cloud-sdk");
|
|
||||||
|
|
||||||
private static final String CMD = "gcloud beta emulators datastore start --project test-project --host-port 0.0.0.0:8081 --consistency=1.0";
|
|
||||||
private static final int HTTP_PORT = 8081;
|
|
||||||
|
|
||||||
String host;
|
String host;
|
||||||
|
|
||||||
public static class CustomDatastoreEmulatorContainer extends DatastoreEmulatorContainer
|
|
||||||
{
|
|
||||||
public CustomDatastoreEmulatorContainer(DockerImageName dockerImageName)
|
|
||||||
{
|
|
||||||
super(dockerImageName);
|
|
||||||
|
|
||||||
dockerImageName.assertCompatibleWith(DEFAULT_IMAGE_NAME);
|
|
||||||
|
|
||||||
withExposedPorts(HTTP_PORT);
|
|
||||||
setWaitStrategy(Wait.forHttp("/").forStatusCode(200));
|
|
||||||
withCommand("/bin/sh", "-c", CMD);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void startExternalSessionStorage() throws Exception
|
public void startExternalSessionStorage() throws Exception
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue