Skip to content

Commit

Permalink
fix: Disable Breaking change related code site (#731)
Browse files Browse the repository at this point in the history
* fix: a race condition in test

* .

* .

* .

* .

* .

* .

* .

* .

* .

* .

* .

* .

Co-authored-by: Stephanie Wang <stephaniewang526@users.noreply.github.com>
  • Loading branch information
yirutang and stephaniewang526 committed Dec 15, 2020
1 parent 08bff34 commit d180293
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
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

0 comments on commit d180293

Please sign in to comment.