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

Method timeout

test/TestHBaseRpc.java:277–290  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

275 }
276
277 @Test
278 public void timeout() throws Exception {
279 final GetRequest rpc = new GetRequest(TABLE, KEY, FAMILY);
280 final Deferred<Object> deferred = rpc.getDeferred();
281 rpc.enqueueTimeout(regionclient);
282 timer.tasks.get(0).getKey().run(rpc.timeout_handle);
283
284 assertNull(rpc.timeout_handle);
285 verify(regionclient).removeRpc(rpc, true);
286 try {
287 deferred.join(1);
288 fail("Expected a RpcTimedOutException");
289 } catch (RpcTimedOutException ex) { }
290 }
291
292 @Test (expected = IllegalStateException.class)
293 public void timeoutAlreadyTimedout() throws Exception {

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