()
| 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 { |
nothing calls this directly
no test coverage detected