diff --git a/core/src/main/java/org/microshed/testing/internal/InternalLogger.java b/core/src/main/java/org/microshed/testing/internal/InternalLogger.java index ea6e5a27..d678d666 100644 --- a/core/src/main/java/org/microshed/testing/internal/InternalLogger.java +++ b/core/src/main/java/org/microshed/testing/internal/InternalLogger.java @@ -14,6 +14,11 @@ public class InternalLogger { private static boolean isLog4jEnabled() { if (!checkedEnabled) { checkedEnabled = true; + try { + Class.forName("org.slf4j.impl.StaticMDCBinder"); + } catch (Throwable t) { + return loggingEnabled = false; + } ClassLoader tccl = Thread.currentThread().getContextClassLoader(); loggingEnabled = tccl.getResource("log4j.properties") != null || tccl.getResource("log4j.xml") != null || diff --git a/sample-apps/everything-app/src/test/java/org/example/app/BasicJAXRSServiceTest.java b/sample-apps/everything-app/src/test/java/org/example/app/BasicJAXRSServiceIT.java similarity index 99% rename from sample-apps/everything-app/src/test/java/org/example/app/BasicJAXRSServiceTest.java rename to sample-apps/everything-app/src/test/java/org/example/app/BasicJAXRSServiceIT.java index ee11e225..d06b4ff2 100644 --- a/sample-apps/everything-app/src/test/java/org/example/app/BasicJAXRSServiceTest.java +++ b/sample-apps/everything-app/src/test/java/org/example/app/BasicJAXRSServiceIT.java @@ -35,7 +35,7 @@ @MicroShedTest @SharedContainerConfig(AppContainerConfig.class) -public class BasicJAXRSServiceTest { +public class BasicJAXRSServiceIT { @RESTClient public static PersonService personSvc; diff --git a/sample-apps/everything-app/src/test/java/org/example/app/DependentServiceTest.java b/sample-apps/everything-app/src/test/java/org/example/app/DependentServiceIT.java similarity index 98% rename from sample-apps/everything-app/src/test/java/org/example/app/DependentServiceTest.java rename to sample-apps/everything-app/src/test/java/org/example/app/DependentServiceIT.java index 7f3f3032..fffac221 100644 --- a/sample-apps/everything-app/src/test/java/org/example/app/DependentServiceTest.java +++ b/sample-apps/everything-app/src/test/java/org/example/app/DependentServiceIT.java @@ -38,7 +38,7 @@ @MicroShedTest @SharedContainerConfig(AppContainerConfig.class) -public class DependentServiceTest { +public class DependentServiceIT { @RESTClient public static PersonServiceWithPassthrough personSvc; diff --git a/sample-apps/everything-app/src/test/java/org/example/app/MongoAndLibertyTest.java b/sample-apps/everything-app/src/test/java/org/example/app/MongoAndLibertyIT.java similarity index 98% rename from sample-apps/everything-app/src/test/java/org/example/app/MongoAndLibertyTest.java rename to sample-apps/everything-app/src/test/java/org/example/app/MongoAndLibertyIT.java index 016386b7..f7cf882c 100644 --- a/sample-apps/everything-app/src/test/java/org/example/app/MongoAndLibertyTest.java +++ b/sample-apps/everything-app/src/test/java/org/example/app/MongoAndLibertyIT.java @@ -30,7 +30,7 @@ @MicroShedTest @SharedContainerConfig(AppContainerConfig.class) -public class MongoAndLibertyTest { +public class MongoAndLibertyIT { @RESTClient public static PersonServiceWithMongo personSvc; diff --git a/sample-apps/everything-app/src/test/java/org/example/app/RestAssuredTest.java b/sample-apps/everything-app/src/test/java/org/example/app/RestAssuredIT.java similarity index 99% rename from sample-apps/everything-app/src/test/java/org/example/app/RestAssuredTest.java rename to sample-apps/everything-app/src/test/java/org/example/app/RestAssuredIT.java index 8440b341..ace213de 100644 --- a/sample-apps/everything-app/src/test/java/org/example/app/RestAssuredTest.java +++ b/sample-apps/everything-app/src/test/java/org/example/app/RestAssuredIT.java @@ -29,7 +29,7 @@ @MicroShedTest @SharedContainerConfig(AppContainerConfig.class) -public class RestAssuredTest { +public class RestAssuredIT { @Test public void testCreatePerson() { diff --git a/sample-apps/jaxrs-basicauth/src/test/java/org/example/app/SecuredSvcTest.java b/sample-apps/jaxrs-basicauth/src/test/java/org/example/app/SecuredSvcIT.java similarity index 98% rename from sample-apps/jaxrs-basicauth/src/test/java/org/example/app/SecuredSvcTest.java rename to sample-apps/jaxrs-basicauth/src/test/java/org/example/app/SecuredSvcIT.java index b2c47838..739c95b1 100644 --- a/sample-apps/jaxrs-basicauth/src/test/java/org/example/app/SecuredSvcTest.java +++ b/sample-apps/jaxrs-basicauth/src/test/java/org/example/app/SecuredSvcIT.java @@ -32,7 +32,7 @@ import org.testcontainers.junit.jupiter.Container; @MicroShedTest -public class SecuredSvcTest { +public class SecuredSvcIT { @Container public static ApplicationContainer app = new ApplicationContainer() diff --git a/sample-apps/wildfly-app/src/test/java/org/example/app/JaxrsJsonTest.java b/sample-apps/jaxrs-json/src/test/java/org/example/app/JaxrsJsonIT.java similarity index 99% rename from sample-apps/wildfly-app/src/test/java/org/example/app/JaxrsJsonTest.java rename to sample-apps/jaxrs-json/src/test/java/org/example/app/JaxrsJsonIT.java index f50e952b..789ef4cb 100644 --- a/sample-apps/wildfly-app/src/test/java/org/example/app/JaxrsJsonTest.java +++ b/sample-apps/jaxrs-json/src/test/java/org/example/app/JaxrsJsonIT.java @@ -36,7 +36,7 @@ import org.testcontainers.junit.jupiter.Container; @MicroShedTest -public class JaxrsJsonTest { +public class JaxrsJsonIT { @Container public static ApplicationContainer app = new ApplicationContainer() diff --git a/sample-apps/jaxrs-mpjwt/src/test/java/org/example/app/SecuredSvcTest.java b/sample-apps/jaxrs-mpjwt/src/test/java/org/example/app/SecuredSvcIT.java similarity index 98% rename from sample-apps/jaxrs-mpjwt/src/test/java/org/example/app/SecuredSvcTest.java rename to sample-apps/jaxrs-mpjwt/src/test/java/org/example/app/SecuredSvcIT.java index 738f8907..6ce4d459 100644 --- a/sample-apps/jaxrs-mpjwt/src/test/java/org/example/app/SecuredSvcTest.java +++ b/sample-apps/jaxrs-mpjwt/src/test/java/org/example/app/SecuredSvcIT.java @@ -32,7 +32,7 @@ import org.testcontainers.junit.jupiter.Container; @MicroShedTest -public class SecuredSvcTest { +public class SecuredSvcIT { @Container public static ApplicationContainer app = new ApplicationContainer() diff --git a/sample-apps/jdbc-app/src/test/java/org/example/app/AppContainerConfig.java b/sample-apps/jdbc-app/src/test/java/org/example/app/AppContainerConfig.java index 03bb48de..7e5f6354 100644 --- a/sample-apps/jdbc-app/src/test/java/org/example/app/AppContainerConfig.java +++ b/sample-apps/jdbc-app/src/test/java/org/example/app/AppContainerConfig.java @@ -28,8 +28,7 @@ public class AppContainerConfig implements SharedContainerConfiguration { @Container public static PostgreSQLContainer postgres = new PostgreSQLContainer<>() .withNetworkAliases("testpostgres") - .withDatabaseName("testdb") - .withReuse(true); + .withDatabaseName("testdb"); @Container public static ApplicationContainer app = new ApplicationContainer() diff --git a/sample-apps/jdbc-app/src/test/java/org/example/app/DatabaseTest.java b/sample-apps/jdbc-app/src/test/java/org/example/app/DatabaseIT.java similarity index 98% rename from sample-apps/jdbc-app/src/test/java/org/example/app/DatabaseTest.java rename to sample-apps/jdbc-app/src/test/java/org/example/app/DatabaseIT.java index bc9cdea6..2b14e01c 100644 --- a/sample-apps/jdbc-app/src/test/java/org/example/app/DatabaseTest.java +++ b/sample-apps/jdbc-app/src/test/java/org/example/app/DatabaseIT.java @@ -30,7 +30,7 @@ @MicroShedTest @SharedContainerConfig(AppContainerConfig.class) -public class DatabaseTest { +public class DatabaseIT { @RESTClient public static PersonServiceWithJDBC personSvc; diff --git a/sample-apps/liberty-app/src/test/java/org/example/app/BasicLibertyAppTest.java b/sample-apps/liberty-app/src/test/java/org/example/app/BasicLibertyAppIT.java similarity index 99% rename from sample-apps/liberty-app/src/test/java/org/example/app/BasicLibertyAppTest.java rename to sample-apps/liberty-app/src/test/java/org/example/app/BasicLibertyAppIT.java index 6dd25859..3f59cf05 100644 --- a/sample-apps/liberty-app/src/test/java/org/example/app/BasicLibertyAppTest.java +++ b/sample-apps/liberty-app/src/test/java/org/example/app/BasicLibertyAppIT.java @@ -35,7 +35,7 @@ import org.testcontainers.junit.jupiter.Container; @MicroShedTest -public class BasicLibertyAppTest { +public class BasicLibertyAppIT { @Container public static ApplicationContainer app = new ApplicationContainer() diff --git a/sample-apps/maven-app/pom.xml b/sample-apps/maven-app/pom.xml index 7fd5be4d..7569a4e9 100644 --- a/sample-apps/maven-app/pom.xml +++ b/sample-apps/maven-app/pom.xml @@ -63,21 +63,19 @@ - org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M3 + 2.22.0 - integration-test - integration-test integration-test + verify - - false - + + false + diff --git a/sample-apps/payara-app/src/test/java/org/example/app/JaxrsJsonTest.java b/sample-apps/payara-app/src/test/java/org/example/app/JaxrsJsonIT.java similarity index 99% rename from sample-apps/payara-app/src/test/java/org/example/app/JaxrsJsonTest.java rename to sample-apps/payara-app/src/test/java/org/example/app/JaxrsJsonIT.java index f50e952b..789ef4cb 100644 --- a/sample-apps/payara-app/src/test/java/org/example/app/JaxrsJsonTest.java +++ b/sample-apps/payara-app/src/test/java/org/example/app/JaxrsJsonIT.java @@ -36,7 +36,7 @@ import org.testcontainers.junit.jupiter.Container; @MicroShedTest -public class JaxrsJsonTest { +public class JaxrsJsonIT { @Container public static ApplicationContainer app = new ApplicationContainer() diff --git a/sample-apps/jaxrs-json/src/test/java/org/example/app/JaxrsJsonTest.java b/sample-apps/wildfly-app/src/test/java/org/example/app/JaxrsJsonIT.java similarity index 99% rename from sample-apps/jaxrs-json/src/test/java/org/example/app/JaxrsJsonTest.java rename to sample-apps/wildfly-app/src/test/java/org/example/app/JaxrsJsonIT.java index f50e952b..789ef4cb 100644 --- a/sample-apps/jaxrs-json/src/test/java/org/example/app/JaxrsJsonTest.java +++ b/sample-apps/wildfly-app/src/test/java/org/example/app/JaxrsJsonIT.java @@ -36,7 +36,7 @@ import org.testcontainers.junit.jupiter.Container; @MicroShedTest -public class JaxrsJsonTest { +public class JaxrsJsonIT { @Container public static ApplicationContainer app = new ApplicationContainer()