james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [3/4] james-project git commit: JAMES-1912 Reduce function call by calling to existed on
Date Wed, 03 May 2017 03:41:08 GMT
JAMES-1912 Reduce function call by calling to existed on


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

Branch: refs/heads/master
Commit: 92f9bebc981fd169b4afeaef4c2171babe73ad53
Parents: 0f7ee8c
Author: quynhn <qnguyen@linagora.com>
Authored: Fri Apr 21 17:10:03 2017 +0700
Committer: benwa <btellier@linagora.com>
Committed: Wed May 3 10:40:41 2017 +0700

----------------------------------------------------------------------
 .../java/org/apache/james/metric/es/ESReporterTest.java     | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/92f9bebc/server/container/metrics/metrics-es-reporter/src/test/java/org/apache/james/metric/es/ESReporterTest.java
----------------------------------------------------------------------
diff --git a/server/container/metrics/metrics-es-reporter/src/test/java/org/apache/james/metric/es/ESReporterTest.java
b/server/container/metrics/metrics-es-reporter/src/test/java/org/apache/james/metric/es/ESReporterTest.java
index fa5aa43..da91772 100644
--- a/server/container/metrics/metrics-es-reporter/src/test/java/org/apache/james/metric/es/ESReporterTest.java
+++ b/server/container/metrics/metrics-es-reporter/src/test/java/org/apache/james/metric/es/ESReporterTest.java
@@ -62,7 +62,7 @@ public class ESReporterTest {
 
     @Before
     public void setUp() {
-        clientProvider = ClientProviderImpl.forHost(getContainerIp(), ES_APPLICATIVE_PORT);
+        clientProvider = ClientProviderImpl.forHost(esContainer.getIp(), ES_APPLICATIVE_PORT);
         await().atMost(Duration.ONE_MINUTE)
             .until(() -> elasticSearchStarted(clientProvider));
 
@@ -71,7 +71,7 @@ public class ESReporterTest {
         esMetricReporter = new ESMetricReporter(
             ESReporterConfiguration.builder()
                 .enabled()
-                .onHost(getContainerIp(), ES_HTTP_PORT)
+                .onHost(esContainer.getIp(), ES_HTTP_PORT)
                 .onIndex(INDEX)
                 .periodInSecond(PERIOD_IN_SECOND)
                 .build(),
@@ -134,9 +134,4 @@ public class ESReporterTest {
         }
     }
 
-    @SuppressWarnings("deprecation")
-    private String getContainerIp() {
-        return esContainer.getContainerInfo().getNetworkSettings().getIpAddress();
-    }
-
 }


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