MCPcopy Index your code
hub / github.com/OpenTSDB/asynchbase / handleRootZnode91Resolve

Method handleRootZnode91Resolve

test/TestZKClient.java:777–790  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

775 }
776
777 @Test
778 public void handleRootZnode91Resolve() throws Exception {
779 final InetAddress addr = mock(InetAddress.class);
780 when(addr.getHostAddress()).thenReturn("192.168.1.1");
781 mockStatic(InetAddress.class);
782 PowerMockito.when(InetAddress.getByName("myzkhost")).thenReturn(addr);
783
784 final ZKCallback cb = zk_client.new ZKCallback();
785 final byte[] data = "myzkhost,50511,1388534400000".getBytes(CHARSET);
786 final RegionClient rc = cb.handleRootZnode(data);
787 assertNotNull(rc);
788 assertEquals("192.168.1.1:50511", rc.getRemoteAddress());
789 verifyPrivate(client).invoke("newClient", "192.168.1.1", 50511);
790 }
791
792 @Test (expected = NumberFormatException.class)
793 public void handleRootZnode91NoPort() throws Exception {

Callers

nothing calls this directly

Calls 2

handleRootZnodeMethod · 0.95
getRemoteAddressMethod · 0.95

Tested by

no test coverage detected