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

Method deserializeMissingRPC

test/TestMultiAction.java:411–424  ·  view source on GitHub ↗

This shouldn't happen. It means we had n RPC in our multi action but somehow HBase returned n+ responses.

()

Source from the content-addressed store, hash-verified

409 /** This shouldn't happen. It means we had n RPC in our multi action but
410 somehow HBase returned n+ responses. */
411 @Test (expected = IndexOutOfBoundsException.class)
412 public void deserializeMissingRPC() throws Exception {
413 final List<ResultOrException> results = new ArrayList<ResultOrException>(2);
414 results.add(PBufResponses.generateEmptyResult(0));
415 results.add(PBufResponses.generateEmptyResult(1));
416
417 PutRequest put1 = new PutRequest(TABLE, KEY, FAMILY, QUALIFIER, VALUE);
418 put1.region = region;
419 MultiAction multi = new MultiAction();
420 multi.add(put1);
421
422 multi.deserialize(PBufResponses.encodeResponse(
423 PBufResponses.generateMultiActionResponse(results)), 0);
424 }
425
426 /** This shouldn't happen either. HBase should respond to ALL RPCs */
427 @Test (expected = InvalidResponseException.class)

Callers

nothing calls this directly

Calls 6

generateEmptyResultMethod · 0.95
addMethod · 0.95
deserializeMethod · 0.95
encodeResponseMethod · 0.95
addMethod · 0.45

Tested by

no test coverage detected