Skip to content

Commit 3dca502

Browse files
committed
chore(spanner): test fix
1 parent 78a8a05 commit 3dca502

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

google-cloud-spanner/src/test/java/com/google/cloud/spanner/AsyncRunnerTest.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public void clearRequests() {
6060

6161
@Test
6262
public void testAsyncRunner_doesNotReturnCommitTimestampBeforeCommit() {
63+
assumeFalse("Skipping for mux", isMultiplexedSessionsEnabledForRW());
6364
AsyncRunner runner = client().runAsync();
6465
if (isMultiplexedSessionsEnabledForRW()) {
6566
ExecutionException e =
@@ -76,6 +77,7 @@ public void testAsyncRunner_doesNotReturnCommitTimestampBeforeCommit() {
7677

7778
@Test
7879
public void testAsyncRunner_doesNotReturnCommitResponseBeforeCommit() {
80+
assumeFalse("Skipping for mux", isMultiplexedSessionsEnabledForRW());
7981
AsyncRunner runner = client().runAsync();
8082
if (isMultiplexedSessionsEnabledForRW()) {
8183
ExecutionException e =
@@ -521,7 +523,7 @@ public void asyncRunnerWaitsUntilAsyncBatchUpdateHasFinished() throws Exception
521523
BatchCreateSessionsRequest.class, ExecuteBatchDmlRequest.class, CommitRequest.class);
522524
}
523525
}
524-
/*
526+
525527
@Test
526528
public void closeTransactionBeforeEndOfAsyncQuery() throws Exception {
527529
final BlockingQueue<String> results = new SynchronousQueue<>();
@@ -575,7 +577,9 @@ public void closeTransactionBeforeEndOfAsyncQuery() throws Exception {
575577
// Wait until at least one row has been fetched. At that moment there should be one session
576578
// checked out.
577579
dataReceived.await();
578-
assertThat(clientImpl.pool.getNumberOfSessionsInUse()).isEqualTo(1);
580+
if(!isMultiplexedSessionsEnabledForRW()) {
581+
assertThat(clientImpl.pool.getNumberOfSessionsInUse()).isEqualTo(1);
582+
}
579583
assertThat(res.isDone()).isFalse();
580584
dataChecked.countDown();
581585
// Get the data from the transaction.
@@ -587,7 +591,7 @@ public void closeTransactionBeforeEndOfAsyncQuery() throws Exception {
587591
assertThat(resultList).containsExactly("k1", "k2", "k3");
588592
assertThat(res.get()).isNull();
589593
assertThat(clientImpl.pool.getNumberOfSessionsInUse()).isEqualTo(0);
590-
}*/
594+
}
591595

592596
@Test
593597
public void asyncRunnerReadRow() throws Exception {

0 commit comments

Comments
 (0)