MCPcopy Index your code
hub / github.com/OpenTSDB/asynchbase / goodGetRequest

Method goodGetRequest

test/TestRegionClientDecode.java:98–119  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96 }
97
98 @Test
99 public void goodGetRequest() throws Exception {
100 final int id = 42;
101 final ChannelBuffer buffer = buildGoodResponse(false, id);
102 final GetRequest get = new GetRequest(TABLE, ROW);
103 final Deferred<Object> deferred = get.getDeferred();
104 inflightTheRpc(id, get);
105
106 assertNull(region_client.decode(ctx, chan, buffer, VOID));
107 @SuppressWarnings("unchecked")
108 final List<KeyValue> kvs = (List<KeyValue>)deferred.joinUninterruptibly();
109 assertEquals(1, kvs.size());
110 assertArrayEquals(ROW, kvs.get(0).key());
111 assertArrayEquals(FAMILY, kvs.get(0).family());
112 assertArrayEquals(QUALIFIER, kvs.get(0).qualifier());
113 assertArrayEquals(VALUE, kvs.get(0).value());
114 assertEquals(TIMESTAMP, kvs.get(0).timestamp());
115 verify(secure_rpc_helper, never()).handleResponse(buffer, chan);
116 assertEquals(1, timer.tasks.size());
117 assertEquals(60000, (long)timer.tasks.get(0).getValue());
118 verify(timer.timeouts.get(0), times(1)).cancel();
119 }
120
121 @Test
122 public void goodGetRequestArrayBacked() throws Exception {

Callers

nothing calls this directly

Calls 12

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
handleResponseMethod · 0.45

Tested by

no test coverage detected