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

Method processResultRootCallWaiter

test/TestZKClient.java:648–665  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

646 }
647
648 @Test
649 public void processResultRootCallWaiter() throws Exception {
650 final Deferred<Object> root = zk_client.getDeferredRoot();
651 assertNotNull(root);
652 final ZKCallback cb = zk_client.new ZKCallback();
653 final byte[] data = "127.0.0.1:50511".getBytes(CHARSET);
654 cb.processResult(Code.OK.intValue(), "/hbase/root-region-server", null,
655 data, stat);
656 verifyPrivate(client).invoke("newClient", "127.0.0.1", 50511);
657 verifyPrivate(zk_client).invoke("connectZK");
658 verifyPrivate(zk_client).invoke("disconnectZK");
659 verifyPrivate(zk_client, never()).invoke("retryGetRootRegionLater");
660 assertEquals(Byte.valueOf("1"),
661 (Byte)Whitebox.getInternalState(cb, "found_root"));
662 assertEquals(Byte.valueOf("0"),
663 (Byte)Whitebox.getInternalState(cb, "found_meta"));
664 assertNotNull(root.joinUninterruptibly());
665 }
666
667 @Test
668 public void processResultRootCallWaiters() throws Exception {

Callers

nothing calls this directly

Calls 3

processResultMethod · 0.95
intValueMethod · 0.80
getDeferredRootMethod · 0.45

Tested by

no test coverage detected