james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [2/3] james-project git commit: JAMES-2207 Waiting strategy was missing in VacationRelayIntegrationTest and for SmtpForwarding
Date Tue, 07 Nov 2017 03:17:34 GMT
JAMES-2207 Waiting strategy was missing in VacationRelayIntegrationTest and for SmtpForwarding


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

Branch: refs/heads/master
Commit: 3f921bab62f64032e01293ce60c1a6624f7ff1b0
Parents: 0b27e88
Author: benwa <btellier@linagora.com>
Authored: Sun Nov 5 22:55:58 2017 +0700
Committer: benwa <btellier@linagora.com>
Committed: Tue Nov 7 10:16:16 2017 +0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java | 4 +++-
 .../java/org/apache/james/jmap/VacationRelayIntegrationTest.java | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/3f921bab/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java
b/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java
index 8510c53..1e87578 100644
--- a/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java
+++ b/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java
@@ -33,6 +33,7 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.RuleChain;
 import org.junit.rules.TemporaryFolder;
+import org.testcontainers.containers.wait.HostPortWaitStrategy;
 
 import com.google.common.base.Charsets;
 import com.jayway.restassured.RestAssured;
@@ -49,7 +50,8 @@ public abstract class ForwardSmtpTest {
     private final TemporaryFolder folder = new TemporaryFolder();
     private final SwarmGenericContainer fakeSmtp = new SwarmGenericContainer("weave/rest-smtp-sink:latest")
             .withExposedPorts(25)
-            .withAffinityToContainer();
+            .withAffinityToContainer()
+            .waitingFor(new HostPortWaitStrategy());
     
     @Rule
     public final RuleChain chain = RuleChain.outerRule(folder).around(fakeSmtp);

http://git-wip-us.apache.org/repos/asf/james-project/blob/3f921bab/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/VacationRelayIntegrationTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/VacationRelayIntegrationTest.java
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/VacationRelayIntegrationTest.java
index 7bc8266..a750699 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/VacationRelayIntegrationTest.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/VacationRelayIntegrationTest.java
@@ -43,6 +43,7 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
+import org.testcontainers.containers.wait.HostPortWaitStrategy;
 
 import com.google.common.base.Charsets;
 import com.jayway.awaitility.Awaitility;
@@ -66,7 +67,8 @@ public abstract class VacationRelayIntegrationTest {
 
     @Rule
     public final SwarmGenericContainer fakeSmtp = new SwarmGenericContainer("weave/rest-smtp-sink:latest")
-        .withExposedPorts(VacationRelayIntegrationTest.REST_SMTP_SINK_PORT);
+        .withExposedPorts(REST_SMTP_SINK_PORT)
+        .waitingFor(new HostPortWaitStrategy());
 
 
     private ConditionFactory calmlyAwait;


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


Mime
View raw message