Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

Commit 31af7be

Browse files
committed
.
1 parent aa55724 commit 31af7be

File tree

1 file changed

+5
-0
lines changed
  • google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta2

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,10 @@ public Throwable call() {
637637
}
638638
}
639639
return null;
640+
} catch (IllegalStateException ex) {
641+
// Sometimes the append will happen after the stream is shutdown.
642+
ex.printStackTrace();
643+
return null;
640644
} catch (Exception e) {
641645
return e;
642646
}
@@ -650,6 +654,7 @@ public Throwable call() {
650654
fakeExecutor.advanceTime(Duration.ofSeconds(10));
651655
// The first requests gets back while the second one is blocked.
652656
assertEquals(2L, appendFuture1.get().getAppendResult().getOffset().getValue());
657+
Thread.sleep(500);
653658
// When close is called, there should be one inflight request waiting.
654659
writer.close();
655660
if (future.get() != null) {

0 commit comments

Comments
 (0)