()
| 317 | } |
| 318 | |
| 319 | @Test |
| 320 | public void tooManyAttempts() throws Exception { |
| 321 | final HBaseRpc rpc = getMockHBaseRpc(null); |
| 322 | rpc.attempt = (byte) (10 + 1); |
| 323 | final Deferred<Object> error = HBaseClient.tooManyAttempts(rpc, |
| 324 | new NoSuchColumnFamilyException("Fail!", rpc)); |
| 325 | assertNotNull(error); |
| 326 | NonRecoverableException ex = null; |
| 327 | try { |
| 328 | error.joinUninterruptibly(); |
| 329 | } catch (NonRecoverableException e) { |
| 330 | ex = e; |
| 331 | } |
| 332 | assertNotNull(ex); |
| 333 | assertTrue(ex instanceof NonRecoverableException); |
| 334 | assertNotNull(ex.getCause()); |
| 335 | assertTrue(ex.getCause() instanceof NoSuchColumnFamilyException); |
| 336 | verify(rpc).callback(any()); |
| 337 | } |
| 338 | |
| 339 | @Test |
| 340 | public void tooManyAttemptsNullException() throws Exception { |
nothing calls this directly
no test coverage detected