Skip to content

Commit

Permalink
Update test classes to match Failsafe conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
aguibert committed May 6, 2020
1 parent 8ac2eec commit e3553fe
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

@MicroShedTest
@SharedContainerConfig(AppContainerConfig.class)
public class BasicJAXRSServiceTest {
public class BasicJAXRSServiceIT {

@RESTClient
public static PersonService personSvc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

@MicroShedTest
@SharedContainerConfig(AppContainerConfig.class)
public class DependentServiceTest {
public class DependentServiceIT {

@RESTClient
public static PersonServiceWithPassthrough personSvc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

@MicroShedTest
@SharedContainerConfig(AppContainerConfig.class)
public class MongoAndLibertyTest {
public class MongoAndLibertyIT {

@RESTClient
public static PersonServiceWithMongo personSvc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

@MicroShedTest
@SharedContainerConfig(AppContainerConfig.class)
public class RestAssuredTest {
public class RestAssuredIT {

@Test
public void testCreatePerson() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import org.testcontainers.junit.jupiter.Container;

@MicroShedTest
public class SecuredSvcTest {
public class SecuredSvcIT {

@Container
public static ApplicationContainer app = new ApplicationContainer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import org.testcontainers.junit.jupiter.Container;

@MicroShedTest
public class JaxrsJsonTest {
public class JaxrsJsonIT {

@Container
public static ApplicationContainer app = new ApplicationContainer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import org.testcontainers.junit.jupiter.Container;

@MicroShedTest
public class SecuredSvcTest {
public class SecuredSvcIT {

@Container
public static ApplicationContainer app = new ApplicationContainer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

@MicroShedTest
@SharedContainerConfig(AppContainerConfig.class)
public class DatabaseTest {
public class DatabaseIT {

@RESTClient
public static PersonServiceWithJDBC personSvc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import org.testcontainers.junit.jupiter.Container;

@MicroShedTest
public class BasicLibertyAppTest {
public class BasicLibertyAppIT {

@Container
public static ApplicationContainer app = new ApplicationContainer()
Expand Down
12 changes: 5 additions & 7 deletions sample-apps/maven-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,19 @@
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M3</version>
<version>2.22.0</version>
<executions>
<execution>
<phase>integration-test</phase>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<trimStackTrace>false</trimStackTrace>
</configuration>
</execution>
</executions>
<configuration>
<trimStackTrace>false</trimStackTrace>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import org.testcontainers.junit.jupiter.Container;

@MicroShedTest
public class JaxrsJsonTest {
public class JaxrsJsonIT {

@Container
public static ApplicationContainer app = new ApplicationContainer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import org.testcontainers.junit.jupiter.Container;

@MicroShedTest
public class JaxrsJsonTest {
public class JaxrsJsonIT {

@Container
public static ApplicationContainer app = new ApplicationContainer()
Expand Down

0 comments on commit e3553fe

Please sign in to comment.