File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
graylog2-server/src/test/java/org/graylog/testing/completebackend Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -38,12 +38,12 @@ public MailServerContainer(GenericContainer<?> container) {
3838 }
3939
4040 public static MailServerContainer createStarted (Network network ) {
41- final GenericContainer <?> genericContainer = new GenericContainer <>(DockerImageName .parse ("mailhog/mailhog:v1.0.1" ));
42- genericContainer .withNetwork (network );
43- genericContainer .withNetworkAliases ("mailserver" );
44- genericContainer .addExposedPorts (1025 , API_PORT );
41+ final var genericContainer = new GenericContainer <>(DockerImageName .parse ("mailhog/mailhog:v1.0.1" ))
42+ .withNetwork (network )
43+ .withNetworkAliases ("mailserver" )
44+ .waitingFor (new HttpWaitStrategy ().forPath ("/api/v2/messages" ).forPort (API_PORT ).withStartupTimeout (Duration .ofSeconds (10 )))
45+ .withExposedPorts (1025 , API_PORT );
4546 genericContainer .start ();
46- genericContainer .waitingFor (new HttpWaitStrategy ().forPath ("/api/v2/messages" ).forPort (API_PORT ).withStartupTimeout (Duration .ofSeconds (10 )));
4747 LOG .debug ("Mailhog mailserver started" );
4848 return new MailServerContainer (genericContainer );
4949 }
You can’t perform that action at this time.
0 commit comments