MCPcopy Create free account
hub / github.com/OpenTSDB/asynchbase / nullContext

Method nullContext

test/TestRegionClientDecode.java:976–997  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 11

buildGoodResponseMethod · 0.95
inflightTheRpcMethod · 0.95
decodeMethod · 0.80
keyMethod · 0.65
familyMethod · 0.65
qualifierMethod · 0.65
valueMethod · 0.65
timestampMethod · 0.65
getDeferredMethod · 0.45
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected