Fix test so that it can run offline too

Test was getting stuck for me when I tried to run it offline while
resolving the host. creating unresolved SocketAddress works around
this.
This commit is contained in:
Nishant 2015-08-03 23:37:04 +05:30
parent ce5de2b7a7
commit f490547faf
1 changed files with 1 additions and 1 deletions

View File

@ -140,7 +140,7 @@ public class CacheDistributionTest
}
private static MemcachedNode dummyNode(String host, int port) {
SocketAddress address = new InetSocketAddress(host, port);
SocketAddress address = InetSocketAddress.createUnresolved(host, port);
MemcachedNode node = EasyMock.createNiceMock(MemcachedNode.class);
EasyMock.expect(node.getSocketAddress()).andReturn(address).anyTimes();
EasyMock.replay(node);