()
| 974 | } |
| 975 | |
| 976 | @Test |
| 977 | public void nullContext() throws Exception { |
| 978 | // just shows we don't care about the context object |
| 979 | final int id = 42; |
| 980 | final ChannelBuffer buffer = buildGoodResponse(true, id); |
| 981 | final GetRequest get = new GetRequest(TABLE, ROW); |
| 982 | final Deferred<Object> deferred = get.getDeferred(); |
| 983 | inflightTheRpc(id, get); |
| 984 | |
| 985 | region_client.decode(null, chan, buffer, VOID); |
| 986 | @SuppressWarnings("unchecked") |
| 987 | final List<KeyValue> kvs = (List<KeyValue>)deferred.joinUninterruptibly(); |
| 988 | assertEquals(1, kvs.size()); |
| 989 | assertArrayEquals(ROW, kvs.get(0).key()); |
| 990 | assertArrayEquals(FAMILY, kvs.get(0).family()); |
| 991 | assertArrayEquals(QUALIFIER, kvs.get(0).qualifier()); |
| 992 | assertArrayEquals(VALUE, kvs.get(0).value()); |
| 993 | assertEquals(TIMESTAMP, kvs.get(0).timestamp()); |
| 994 | assertEquals(1, timer.tasks.size()); |
| 995 | assertEquals(60000, (long)timer.tasks.get(0).getValue()); |
| 996 | verify(timer.timeouts.get(0), times(1)).cancel(); |
| 997 | } |
| 998 | |
| 999 | @Test |
| 1000 | public void nullChannel() throws Exception { |
nothing calls this directly
no test coverage detected