MCPcopy Index your code
hub / github.com/OpenTSDB/asynchbase / callback

Method callback

test/TestHBaseRpc.java:183–197  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

181 }
182
183 @Test
184 public void callback() throws Exception {
185 final GetRequest rpc = new GetRequest(TABLE, KEY, FAMILY);
186 rpc.attempt = 4;
187 final Deferred<Object> deferred = rpc.getDeferred();
188 final Object response = new Object();
189 assertEquals(4, rpc.attempt);
190 assertNull(rpc.timeout_handle);
191 assertTrue(rpc.hasDeferred());
192
193 rpc.callback(response);
194 assertSame(response, deferred.join());
195 assertEquals(0, rpc.attempt);
196 assertFalse(rpc.hasDeferred());
197 }
198
199 @Test
200 public void callbackNullResult() throws Exception {

Callers 14

tooManyAttemptsMethod · 0.45
answerMethod · 0.45
answerMethod · 0.45
getMockHBaseRpcMethod · 0.45
answerMethod · 0.45
answerMethod · 0.45
answerMethod · 0.45
answerMethod · 0.45
answerMethod · 0.45
callbackNullResultMethod · 0.45
callbackExceptionMethod · 0.45
callbackWithTimeoutMethod · 0.45

Calls 2

hasDeferredMethod · 0.80
getDeferredMethod · 0.45

Tested by

no test coverage detected