use @Testcontainers to disable test if docker not available (#5678)
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
This commit is contained in:
parent
213ac63d2c
commit
48b89f9394
|
@ -66,6 +66,11 @@
|
|||
<artifactId>testcontainers</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.testcontainers</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.testcontainers</groupId>
|
||||
<artifactId>gcloud</artifactId>
|
||||
|
|
|
@ -23,10 +23,12 @@ import org.eclipse.jetty.server.session.SessionDataStoreFactory;
|
|||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
|
||||
/**
|
||||
* ClusteredOrphanedSessionTest
|
||||
*/
|
||||
@Testcontainers(disabledWithoutDocker = true)
|
||||
public class ClusteredOrphanedSessionTest extends AbstractClusteredOrphanedSessionTest
|
||||
{
|
||||
|
||||
|
|
|
@ -22,10 +22,12 @@ import org.eclipse.jetty.server.session.AbstractClusteredSessionScavengingTest;
|
|||
import org.eclipse.jetty.server.session.SessionDataStoreFactory;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
|
||||
/**
|
||||
* ClusteredSessionScavengingTest
|
||||
*/
|
||||
@Testcontainers(disabledWithoutDocker = true)
|
||||
public class ClusteredSessionScavengingTest extends AbstractClusteredSessionScavengingTest
|
||||
{
|
||||
|
||||
|
|
|
@ -24,10 +24,12 @@ import org.eclipse.jetty.server.session.SessionDataStoreFactory;
|
|||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
|
||||
/**
|
||||
* GCloudSessionDataStoreTest
|
||||
*/
|
||||
@Testcontainers(disabledWithoutDocker = true)
|
||||
public class GCloudSessionDataStoreTest extends AbstractSessionDataStoreTest
|
||||
{
|
||||
|
||||
|
|
|
@ -22,10 +22,12 @@ import org.eclipse.jetty.server.session.AbstractClusteredInvalidationSessionTest
|
|||
import org.eclipse.jetty.server.session.SessionDataStoreFactory;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
|
||||
/**
|
||||
* InvalidationSessionTest
|
||||
*/
|
||||
@Testcontainers(disabledWithoutDocker = true)
|
||||
public class InvalidationSessionTest extends AbstractClusteredInvalidationSessionTest
|
||||
{
|
||||
|
||||
|
|
|
@ -145,6 +145,11 @@
|
|||
<artifactId>testcontainers</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.testcontainers</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<profiles>
|
||||
<!-- to test hotrod, configure a cache called "remote-session-test" -->
|
||||
|
|
|
@ -23,10 +23,12 @@ import org.eclipse.jetty.server.session.SessionDataStoreFactory;
|
|||
import org.eclipse.jetty.session.infinispan.InfinispanSessionDataStoreFactory;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
|
||||
/**
|
||||
* InvalidationSessionTest
|
||||
*/
|
||||
@Testcontainers(disabledWithoutDocker = true)
|
||||
public class RemoteClusteredInvalidationSessionTest extends AbstractClusteredInvalidationSessionTest
|
||||
{
|
||||
|
||||
|
|
|
@ -23,10 +23,12 @@ import org.eclipse.jetty.server.session.SessionDataStoreFactory;
|
|||
import org.eclipse.jetty.session.infinispan.InfinispanSessionDataStoreFactory;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
|
||||
/**
|
||||
* ClusteredSessionScavengingTest
|
||||
*/
|
||||
@Testcontainers(disabledWithoutDocker = true)
|
||||
public class RemoteClusteredSessionScavengingTest extends AbstractClusteredSessionScavengingTest
|
||||
{
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ import org.infinispan.query.dsl.QueryFactory;
|
|||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
@ -43,6 +44,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
|
|||
/**
|
||||
* RemoteInfinispanSessionDataStoreTest
|
||||
*/
|
||||
@Testcontainers(disabledWithoutDocker = true)
|
||||
public class RemoteInfinispanSessionDataStoreTest extends AbstractSessionDataStoreTest
|
||||
{
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ import org.eclipse.jetty.server.session.SessionDataStoreFactory;
|
|||
import org.eclipse.jetty.server.session.TestServer;
|
||||
import org.eclipse.jetty.servlet.ServletContextHandler;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
@ -47,6 +48,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
/**
|
||||
* CachingSessionDataStoreTest
|
||||
*/
|
||||
@Testcontainers(disabledWithoutDocker = true)
|
||||
public class CachingSessionDataStoreTest
|
||||
{
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ import org.eclipse.jetty.server.session.TestServer;
|
|||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
@ -49,6 +50,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
* properly escaped and not accidentally removed.
|
||||
* See bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=444595
|
||||
*/
|
||||
@Testcontainers(disabledWithoutDocker = true)
|
||||
public class AttributeNameTest
|
||||
{
|
||||
|
||||
|
|
|
@ -22,7 +22,9 @@ import org.eclipse.jetty.server.session.AbstractClusteredInvalidationSessionTest
|
|||
import org.eclipse.jetty.server.session.SessionDataStoreFactory;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
|
||||
@Testcontainers(disabledWithoutDocker = true)
|
||||
public class ClusteredInvalidateSessionTest extends AbstractClusteredInvalidationSessionTest
|
||||
{
|
||||
|
||||
|
|
|
@ -23,10 +23,12 @@ import org.eclipse.jetty.server.session.SessionDataStoreFactory;
|
|||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
|
||||
/**
|
||||
* ClusteredOrphanedSessionTest
|
||||
*/
|
||||
@Testcontainers(disabledWithoutDocker = true)
|
||||
public class ClusteredOrphanedSessionTest extends AbstractClusteredOrphanedSessionTest
|
||||
{
|
||||
|
||||
|
|
|
@ -22,7 +22,9 @@ import org.eclipse.jetty.server.session.AbstractClusteredSessionScavengingTest;
|
|||
import org.eclipse.jetty.server.session.SessionDataStoreFactory;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
|
||||
@Testcontainers(disabledWithoutDocker = true)
|
||||
public class ClusteredSessionScavengingTest extends AbstractClusteredSessionScavengingTest
|
||||
{
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ import org.eclipse.jetty.servlet.ServletContextHandler;
|
|||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
@ -40,6 +41,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
|
|||
/**
|
||||
* MongoSessionDataStoreTest
|
||||
*/
|
||||
@Testcontainers(disabledWithoutDocker = true)
|
||||
public class MongoSessionDataStoreTest extends AbstractSessionDataStoreTest
|
||||
{
|
||||
|
||||
|
|
Loading…
Reference in New Issue