()
| 260 | } |
| 261 | |
| 262 | @Test |
| 263 | public void callbackWithTimeoutWithoutDeferred() throws Exception { |
| 264 | final GetRequest rpc = new GetRequest(TABLE, KEY, FAMILY); |
| 265 | rpc.attempt = 4; |
| 266 | final Timeout timeout_handle = mock(Timeout.class); |
| 267 | final Object response = new Object(); |
| 268 | rpc.timeout_handle = timeout_handle; |
| 269 | assertFalse(rpc.hasDeferred()); |
| 270 | |
| 271 | rpc.callback(response); |
| 272 | assertEquals(4, rpc.attempt); |
| 273 | assertFalse(rpc.hasDeferred()); |
| 274 | verify(timeout_handle).cancel(); |
| 275 | } |
| 276 | |
| 277 | @Test |
| 278 | public void timeout() throws Exception { |
nothing calls this directly
no test coverage detected