()
| 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 { |
nothing calls this directly
no test coverage detected