MCPcopy Create free account
hub / github.com/OpenTSDB/asynchbase / handleRootZnode90Resolve

Method handleRootZnode90Resolve

test/TestZKClient.java:710–723  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

708 }
709
710 @Test
711 public void handleRootZnode90Resolve() throws Exception {
712 final InetAddress addr = mock(InetAddress.class);
713 when(addr.getHostAddress()).thenReturn("192.168.1.1");
714 mockStatic(InetAddress.class);
715 PowerMockito.when(InetAddress.getByName("myzkhost")).thenReturn(addr);
716
717 final ZKCallback cb = zk_client.new ZKCallback();
718 final byte[] data = "myzkhost:50511".getBytes(CHARSET);
719 final RegionClient rc = cb.handleRootZnode(data);
720 assertNotNull(rc);
721 assertEquals("192.168.1.1:50511", rc.getRemoteAddress());
722 verifyPrivate(client).invoke("newClient", "192.168.1.1", 50511);
723 }
724
725 @Test
726 public void handleRootZnode90NoPort() throws Exception {

Callers

nothing calls this directly

Calls 2

handleRootZnodeMethod · 0.95
getRemoteAddressMethod · 0.95

Tested by

no test coverage detected