james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [3/3] james-project git commit: JAMES-1952 Correct and reactivate ignored test
Date Tue, 07 Nov 2017 03:17:35 GMT
JAMES-1952 Correct and reactivate ignored test


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

Branch: refs/heads/master
Commit: b353752b28d08e4864012c35c28f10a7cd324975
Parents: 3f921ba
Author: benwa <btellier@linagora.com>
Authored: Sun Nov 5 23:22:39 2017 +0700
Committer: benwa <btellier@linagora.com>
Committed: Tue Nov 7 10:16:43 2017 +0700

----------------------------------------------------------------------
 .../es/ClientProviderImplConnectionTest.java         | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/b353752b/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/ClientProviderImplConnectionTest.java
----------------------------------------------------------------------
diff --git a/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/ClientProviderImplConnectionTest.java
b/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/ClientProviderImplConnectionTest.java
index ea93049..2008419 100644
--- a/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/ClientProviderImplConnectionTest.java
+++ b/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/ClientProviderImplConnectionTest.java
@@ -24,7 +24,6 @@ import java.util.concurrent.TimeUnit;
 import org.apache.james.util.streams.SwarmGenericContainer;
 import org.elasticsearch.client.Client;
 import org.elasticsearch.index.query.QueryBuilders;
-import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 import org.slf4j.Logger;
@@ -32,7 +31,6 @@ import org.slf4j.LoggerFactory;
 
 import com.jayway.awaitility.Awaitility;
 
-@Ignore("JAMES-1952")
 public class ClientProviderImplConnectionTest {
     private static final Logger LOGGER = LoggerFactory.getLogger(ClientProviderImplConnectionTest.class);
     private static final String DOCKER_ES_IMAGE = "elasticsearch:2.2.1";
@@ -45,14 +43,15 @@ public class ClientProviderImplConnectionTest {
 
     @Rule
     public SwarmGenericContainer es2 = new SwarmGenericContainer(DOCKER_ES_IMAGE)
-        .withAffinityToContainer();
+        .withAffinityToContainer()
+        .withExposedPorts(ES_APPLICATIVE_PORT);
 
     @Test
     public void connectingASingleServerShouldWork() throws Exception {
         Awaitility.await()
             .atMost(1, TimeUnit.MINUTES)
             .pollInterval(5, TimeUnit.SECONDS)
-            .until(() -> isConnected(ClientProviderImpl.forHost(es1.getHostIp(), 9300)));
+            .until(() -> isConnected(ClientProviderImpl.forHost(es1.getContainerIp(),
9300)));
     }
 
     @Test
@@ -62,8 +61,8 @@ public class ClientProviderImplConnectionTest {
             .pollInterval(5, TimeUnit.SECONDS)
             .until(() ->isConnected(
                 ClientProviderImpl.fromHostsString(
-                    es1.getHostIp() + ":" + ES_APPLICATIVE_PORT + ","
-                    + es2.getHostIp() + ":" + ES_APPLICATIVE_PORT)));
+                    es1.getContainerIp() + ":" + ES_APPLICATIVE_PORT + ","
+                    + es2.getContainerIp() + ":" + ES_APPLICATIVE_PORT)));
     }
 
     @Test
@@ -75,8 +74,8 @@ public class ClientProviderImplConnectionTest {
             .pollInterval(5, TimeUnit.SECONDS)
             .until(() -> isConnected(
                 ClientProviderImpl.fromHostsString(
-                    es1.getHostIp() + ":" + ES_APPLICATIVE_PORT + ","
-                    + es2.getHostIp() + ":" + ES_APPLICATIVE_PORT)));
+                    es1.getContainerIp() + ":" + ES_APPLICATIVE_PORT + ","
+                    + es2.getContainerIp() + ":" + ES_APPLICATIVE_PORT)));
     }
 
     private boolean isConnected(ClientProvider clientProvider) {


---------------------------------------------------------------------
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