()
| 388 | } |
| 389 | |
| 390 | @Test |
| 391 | public void processResultMetaBadMeta() throws Exception { |
| 392 | final ZKCallback cb = zk_client.new ZKCallback(); |
| 393 | final byte[] data = "127.0.0.1:50511".getBytes(CHARSET); |
| 394 | cb.processResult(Code.OK.intValue(), "/hbase/meta-region-server", null, |
| 395 | data, stat); |
| 396 | verifyPrivate(client, never()).invoke("newClient", "127.0.0.1", 50511); |
| 397 | verifyPrivate(zk_client, never()).invoke("connectZK"); |
| 398 | verifyPrivate(zk_client, never()).invoke("disconnectZK"); |
| 399 | verifyPrivate(zk_client).invoke("retryGetRootRegionLater"); |
| 400 | verify(client).newTimeout((TimerTask)any(), anyLong()); |
| 401 | assertEquals(Byte.valueOf("0"), |
| 402 | (Byte)Whitebox.getInternalState(cb, "found_root")); |
| 403 | assertEquals(Byte.valueOf("1"), |
| 404 | (Byte)Whitebox.getInternalState(cb, "found_meta")); |
| 405 | } |
| 406 | |
| 407 | @Test (expected = NullPointerException.class) |
| 408 | public void processResultNullPath() throws Exception { |
nothing calls this directly
no test coverage detected