JAMES-2242 GroupMappingTest should wait fakeSmtp to be started

Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/765a8fd1
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/765a8fd1
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/765a8fd1

Branch: refs/heads/master
Commit: 765a8fd122a9b4b6cdb1586f7001be7d43e9e741
Parents: 6a2d0b2
Author: benwa <btell...@linagora.com>
Authored: Wed Nov 29 16:23:45 2017 +0700
Committer: Antoine Duprat <adup...@linagora.com>
Committed: Mon Dec 4 14:42:13 2017 +0100

----------------------------------------------------------------------
 .../org/apache/james/transport/mailets/GroupMappingTest.java    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/765a8fd1/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingTest.java
----------------------------------------------------------------------
diff --git 
a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingTest.java
 
b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingTest.java
index d025a16..0e5e18f 100644
--- 
a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingTest.java
+++ 
b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingTest.java
@@ -58,6 +58,7 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
+import org.testcontainers.containers.wait.HostPortWaitStrategy;
 
 import com.jayway.awaitility.Awaitility;
 import com.jayway.awaitility.Duration;
@@ -90,7 +91,9 @@ public class GroupMappingTest {
 
     @Rule
     public final SwarmGenericContainer fakeSmtp = new 
SwarmGenericContainer("weave/rest-smtp-sink:latest")
-        .withExposedPorts(25);
+        .withExposedPorts(25)
+        .withAffinityToContainer()
+        .waitingFor(new HostPortWaitStrategy());
 
     private final InMemoryDNSService inMemoryDNSService = new 
InMemoryDNSService();
     @Rule


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to