Skip to content
Permalink
Browse files
fix: An extra test that is still calling old JsonStreamWriter append (#…
…760)

* fix:an extra test that is still calling old JsonStreamWriter append

* .
  • Loading branch information
yirutang committed Jan 5, 2021
1 parent 488f258 commit af72e6e9b4100e4f47fad4139437a04aa3ee7535
Showing with 3 additions and 6 deletions.
  1. +3 −6 ...e/src/test/java/com/google/cloud/bigquery/storage/v1beta2/it/ITBigQueryWriteManualClientTest.java
@@ -331,8 +331,7 @@ public void testJsonStreamWriterBatchWriteWithDefaultStream()
row1.put("test_datetime", "2020-10-1 12:00:00");
JSONArray jsonArr1 = new JSONArray(new JSONObject[] {row1});

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

assertEquals(0, response1.get().getAppendResult().getOffset().getValue());

@@ -350,11 +349,9 @@ public void testJsonStreamWriterBatchWriteWithDefaultStream()
jsonArr3.put(row4);

LOG.info("Sending two more messages");
ApiFuture<AppendRowsResponse> response2 =
jsonStreamWriter.append(jsonArr2, -1, /* allowUnknownFields */ false);
ApiFuture<AppendRowsResponse> response2 = jsonStreamWriter.append(jsonArr2, -1);
LOG.info("Sending one more message");
ApiFuture<AppendRowsResponse> response3 =
jsonStreamWriter.append(jsonArr3, -1, /* allowUnknownFields */ false);
ApiFuture<AppendRowsResponse> response3 = jsonStreamWriter.append(jsonArr3, -1);
assertEquals(1, response2.get().getAppendResult().getOffset().getValue());
assertEquals(3, response3.get().getAppendResult().getOffset().getValue());

0 comments on commit af72e6e

Please sign in to comment.