geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kh...@apache.org
Subject geode git commit: GEODE-3277: Fix test failure caused by ServerState changes
Date Mon, 28 Aug 2017 22:06:23 GMT
Repository: geode
Updated Branches:
  refs/heads/develop f41ca9d7d -> 4a5c56eb8


GEODE-3277: Fix test failure caused by ServerState changes


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/4a5c56eb
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/4a5c56eb
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/4a5c56eb

Branch: refs/heads/develop
Commit: 4a5c56eb8edd277b258e916212d41bec0b0e7b83
Parents: f41ca9d
Author: Ken Howe <khowe@pivotal.io>
Authored: Mon Aug 28 15:04:52 2017 -0700
Committer: Ken Howe <khowe@pivotal.io>
Committed: Mon Aug 28 15:04:52 2017 -0700

----------------------------------------------------------------------
 .../java/org/apache/geode/distributed/ServerLauncherTest.java   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/4a5c56eb/geode-core/src/test/java/org/apache/geode/distributed/ServerLauncherTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/distributed/ServerLauncherTest.java
b/geode-core/src/test/java/org/apache/geode/distributed/ServerLauncherTest.java
index 2bcd994..696cc9b 100755
--- a/geode-core/src/test/java/org/apache/geode/distributed/ServerLauncherTest.java
+++ b/geode-core/src/test/java/org/apache/geode/distributed/ServerLauncherTest.java
@@ -18,7 +18,6 @@ import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.ArgumentMatchers.isNull;
 import static org.mockito.Mockito.atLeast;
 import static org.mockito.Mockito.eq;
 import static org.mockito.Mockito.mock;
@@ -26,6 +25,7 @@ import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
+import java.net.InetAddress;
 import java.util.Collections;
 
 import org.junit.Before;
@@ -271,7 +271,8 @@ public class ServerLauncherTest {
 
     launcher.startCacheServer(cache);
 
-    verify(cacheServer, times(1)).setBindAddress(isNull());
+    // getServerBindAddress() returns the localhost address when set to null in the ServerState
+    verify(cacheServer, times(1)).setBindAddress(InetAddress.getLocalHost().getCanonicalHostName());
     verify(cacheServer, times(1)).setPort(eq(11235));
     verify(cacheServer, times(1)).start();
   }


Mime
View raw message