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

Method simpleGet

test/TestGetRequest.java:57–72  ·  view source on GitHub ↗

Test a simple get request with table and key @throws Exception

()

Source from the content-addressed store, hash-verified

55 * @throws Exception
56 */
57 @Test
58 public void simpleGet() throws Exception {
59 final GetRequest get = new GetRequest(TABLE, KEY);
60 final ArrayList<KeyValue> row = new ArrayList<KeyValue>(1);
61 row.add(KV);
62
63 when(regionclient.isAlive()).thenReturn(true);
64 doAnswer(new Answer<Object>() {
65 public Object answer(final InvocationOnMock invocation) {
66 get.getDeferred().callback(row);
67 return null;
68 }
69 }).when(regionclient).sendRpc(get);
70
71 assertSame(row, client.get(get).joinUninterruptibly());
72 }
73
74 /**
75 * Test a get that queries by family byte

Callers

nothing calls this directly

Calls 4

isAliveMethod · 0.80
sendRpcMethod · 0.80
addMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected