Skip to content

Commit 2332dc1

Browse files
fix: Fix window build bug caused by Instant resolution. (#1884)
* feat: Split writer into connection worker and wrapper, this is a prerequisite for multiplexing client * feat: add connection worker pool skeleton, used for multiplexing client * feat: add Load api for connection worker for multiplexing client * feat: add multiplexing support to connection worker. We will treat every new stream name as a switch of destinationt * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: port the multiplexing client core algorithm and basic tests also fixed a tiny bug inside fake bigquery write impl for getting thre response from offset * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: wire multiplexing connection pool to stream writer * feat: some fixes for multiplexing client * feat: fix some todos, and reject the mixed behavior of passed in client or not * feat: fix the bug that we may peek into the write_stream field but it's possible the proto schema does not contain this field * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: fix the bug that we may peek into the write_stream field but it's possible the proto schema does not contain this field * feat: add getInflightWaitSeconds implementation * feat: Add schema comparision in connection loop to ensure schema update for the same stream name can be notified * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add schema update support to multiplexing * fix: fix windows build bug: windows Instant resolution is different with linux Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent ac86f27 commit 2332dc1

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/JsonStreamWriterTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,8 @@ public void run() throws Throwable {
530530
public void testSimpleSchemaUpdate() throws Exception {
531531
try (JsonStreamWriter writer =
532532
getTestJsonStreamWriterBuilder(TEST_STREAM, TABLE_SCHEMA).build()) {
533+
// Sleep for a short period to make sure the creation timestamp is older.
534+
Sleeper.DEFAULT.sleep(200);
533535
testBigQueryWrite.addResponse(
534536
AppendRowsResponse.newBuilder()
535537
.setAppendResult(

google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/StreamWriterTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import static org.junit.Assert.assertThrows;
2121
import static org.junit.Assert.assertTrue;
2222

23+
import com.google.api.client.util.Sleeper;
2324
import com.google.api.core.ApiFuture;
2425
import com.google.api.gax.batching.FlowController;
2526
import com.google.api.gax.core.NoCredentialsProvider;
@@ -309,6 +310,8 @@ private void testUpdatedSchemaFetch(boolean enableMultiplexing)
309310
AppendRowsResponse response =
310311
writer.append(createProtoRows(new String[] {String.valueOf(0)}), 0).get();
311312
assertEquals(writer.getUpdatedSchema(), UPDATED_TABLE_SCHEMA);
313+
// Sleep for a short period to make sure the creation timestamp is older.
314+
Sleeper.DEFAULT.sleep(200);
312315

313316
// Create another writer, although it's the same stream name but the time stamp is newer, thus
314317
// the old updated schema won't get returned.

0 commit comments

Comments
 (0)