Skip to content

Commit 6102876

Browse files
committed
chore(spanner): fix test
1 parent d4b05a4 commit 6102876

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITAsyncExamplesTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,12 @@ public void runAsyncBatchUpdate() throws Exception {
305305
},
306306
executor);
307307
assertThat(insertCount.get()).asList().containsExactly(1L, 1L, 1L);
308+
if (env.getTestHelper().getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()) {
309+
// The runAsync() method should only be called once on the runner.
310+
// However, due to a bug in regular sessions, it can be executed multiple times on the same
311+
// runner.
312+
runner = client.runAsync();
313+
}
308314
ApiFuture<long[]> deleteCount =
309315
runner.runAsync(
310316
txn ->

0 commit comments

Comments
 (0)