Skip to content

Commit

Permalink
fix: glassfish container not run in expected
Browse files Browse the repository at this point in the history
  • Loading branch information
ReaJason committed Dec 12, 2024
1 parent d9a7bac commit e1d851b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ public class GlassFish3ContainerTest {
@Container
public static final GenericContainer<?> container = new GenericContainer<>(imageName)
.withCopyToContainer(warFile, "/usr/local/glassfish3/glassfish/domains/domain1/autodeploy/app.war")
.waitingFor(Wait.forLogMessage(".*startup time.*", 1))
.waitingFor(Wait.forLogMessage(".*done.*", 1))
.waitingFor(Wait.forHttp("/app/"))
.withExposedPorts(8080);

static Stream<Arguments> casesProvider() {
Expand All @@ -60,6 +61,7 @@ static Stream<Arguments> casesProvider() {
@AfterAll
static void tearDown() {
String logs = container.getLogs();
log.info(logs);
assertThat("Logs should not contain any exceptions", logs, doesNotContainException());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ public class GlassFish4ContainerTest {
@Container
public static final GenericContainer<?> container = new GenericContainer<>(imageName)
.withCopyToContainer(warFile, "/usr/local/glassfish4/glassfish/domains/domain1/autodeploy/app.war")
.waitingFor(Wait.forLogMessage(".*startup time.*", 1))
.waitingFor(Wait.forLogMessage(".*done.*", 1))
.waitingFor(Wait.forHttp("/app/"))
.withExposedPorts(8080);

static Stream<Arguments> casesProvider() {
Expand All @@ -60,6 +61,7 @@ static Stream<Arguments> casesProvider() {
@AfterAll
static void tearDown() {
String logs = container.getLogs();
log.info(logs);
assertThat("Logs should not contain any exceptions", logs, doesNotContainException());
}

Expand Down

0 comments on commit e1d851b

Please sign in to comment.