Skip to content
Permalink
Browse files
fix: Disable Breaking change related code site (#731)
* 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 d180293b47484c6257ae065f7ea2a5a6be8a5383
@@ -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());
}
}
@@ -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();
@@ -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());

0 comments on commit d180293

Please sign in to comment.