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

Method timeoutNulledRegionClient

test/TestHBaseRpc.java:316–330  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

314 }
315
316 @Test
317 public void timeoutNulledRegionClient() throws Exception {
318 final GetRequest rpc = new GetRequest(TABLE, KEY, FAMILY);
319 final Deferred<Object> deferred = rpc.getDeferred();
320 rpc.enqueueTimeout(regionclient);
321 Whitebox.setInternalState(rpc, "region_client", (RegionClient)null);
322 timer.tasks.get(0).getKey().run(rpc.timeout_handle);
323
324 assertNull(rpc.timeout_handle);
325 verify(regionclient, never()).removeRpc(rpc, true);
326 try {
327 deferred.join(1);
328 fail("Expected a RpcTimedOutException");
329 } catch (RpcTimedOutException ex) { }
330 }
331}

Callers

nothing calls this directly

Calls 5

removeRpcMethod · 0.80
getDeferredMethod · 0.45
enqueueTimeoutMethod · 0.45
runMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected