Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Disable Breaking change related code site #731

Merged
merged 17 commits into from Dec 15, 2020
Expand Up @@ -485,16 +485,17 @@ private void onFailure(Throwable t) {
private void onSuccess(AppendRowsResponse response) {
for (int i = 0; i < inflightRequests.size(); i++) {
AppendRowsResponse.Builder singleResponse = response.toBuilder();
if (offsetList.get(i) > 0) {
// singleResponse.setOffset(offsetList.get(i));
} else {
long actualOffset = response.getOffset();
for (int j = 0; j < i; j++) {
actualOffset +=
inflightRequests.get(j).message.getProtoRows().getRows().getSerializedRowsCount();
}
// singleResponse.setOffset(actualOffset);
}
// if (offsetList.get(i) > 0) {
// singleResponse.setOffset(offsetList.get(i));
// } else {
// long actualOffset = response.getOffset();
// for (int j = 0; j < i; j++) {
// actualOffset +=
//
// inflightRequests.get(j).message.getProtoRows().getRows().getSerializedRowsCount();
// }
// singleResponse.setOffset(actualOffset);
// }
inflightRequests.get(i).appendResult.set(singleResponse.build());
}
}
Expand Down
Expand Up @@ -908,10 +908,8 @@ public void testFlushAll() throws Exception {
ApiFuture<AppendRowsResponse> appendFuture1 = sendTestMessage(writer, new String[] {"A"});
ApiFuture<AppendRowsResponse> appendFuture2 = sendTestMessage(writer, new String[] {"B"});
ApiFuture<AppendRowsResponse> appendFuture3 = sendTestMessage(writer, new String[] {"C"});

assertFalse(appendFuture3.isDone());
writer.flushAll(100000);

assertTrue(appendFuture3.isDone());

writer.close();
Expand Down
Expand Up @@ -257,6 +257,7 @@ public void testJsonStreamWriterBatchWriteWithCommittedStream()

ApiFuture<AppendRowsResponse> response =
jsonStreamWriter.append(row, -1, /* allowUnknownFields */ false);

// Temp for Breaking Change.
response.get();
// assertEquals(0, response.get().getOffset());
Expand Down