@Test public void testNotRetryable() { MutateRowsRequestManager underTest = new MutateRowsRequestManager(retryOptions, createRequest(3)); Assert.assertEquals( ProcessingStatus.NOT_RETRYABLE, send(underTest, createResponse(OK, OK, NOT_FOUND))); Assert.assertEquals(createResponse(OK, OK, NOT_FOUND), underTest.buildResponse()); }
public MutateRowsResponse buildResponse() { List<MutateRowsResponse.Entry> entries = new ArrayList<>(); for (int i = 0; i < results.length; i++) { Status status = (results[i] == null) ? STATUS_INTERNAL : results[i]; entries.add(createEntry(i, status)); } return MutateRowsResponse.newBuilder().addAllEntries(entries).build(); }
MutateRowsRequestManager { public MutateRowsResponse buildResponse() { List<MutateRowsResponse.Entry> entries = new ArrayList<>(); for (int i = 0; i < results.length; i++) { Status status = (results[i] == null) ? STATUS_INTERNAL : results[i]; entries.add(createEntry(i, status)); } return MutateRowsResponse.newBuilder().addAllEntries(entries).build(); } }
MutateRowsRequestManager { public MutateRowsResponse buildResponse() { List<MutateRowsResponse.Entry> entries = new ArrayList<>(); for (int i = 0; i < results.length; i++) { Status status = (results[i] == null) ? STATUS_INTERNAL : results[i]; entries.add(createEntry(i, status)); } return MutateRowsResponse.newBuilder().addAllEntries(entries).build(); } MutateRowsRequestManager(RetryOptions retryOptions, MutateRowsRequest originalRequest); }
MutateRowsRequestManager { public MutateRowsResponse buildResponse() { List<MutateRowsResponse.Entry> entries = new ArrayList<>(); for (int i = 0; i < results.length; i++) { Status status = (results[i] == null) ? STATUS_INTERNAL : results[i]; entries.add(createEntry(i, status)); } return MutateRowsResponse.newBuilder().addAllEntries(entries).build(); } MutateRowsRequestManager(RetryOptions retryOptions, MutateRowsRequest originalRequest); void onMessage(MutateRowsResponse message); ProcessingStatus onOK(); MutateRowsRequest getRetryRequest(); MutateRowsResponse buildResponse(); }
MutateRowsRequestManager { public MutateRowsResponse buildResponse() { List<MutateRowsResponse.Entry> entries = new ArrayList<>(); for (int i = 0; i < results.length; i++) { Status status = (results[i] == null) ? STATUS_INTERNAL : results[i]; entries.add(createEntry(i, status)); } return MutateRowsResponse.newBuilder().addAllEntries(entries).build(); } MutateRowsRequestManager(RetryOptions retryOptions, MutateRowsRequest originalRequest); void onMessage(MutateRowsResponse message); ProcessingStatus onOK(); MutateRowsRequest getRetryRequest(); MutateRowsResponse buildResponse();  }