Skip to content

Commit a2b0b78

Browse files
committed
---
yaml --- r: 8551 b: refs/heads/snehashah-bugfix c: cd10082 h: refs/heads/master i: 8549: 3665234 8547: 56d3583 8543: cfb88dd
1 parent 4e20d94 commit a2b0b78

2 files changed

Lines changed: 3 additions & 15 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ refs/heads/vkedia-patch-3: 4d128043acaa7db9160faf439d2ca6104e8a88cb
7373
refs/tags/v0.23.0: e5405e1f6d144441b889acd3b6405fdcc3cdfd72
7474
refs/tags/v0.23.1: 30bcf8076ef9d71cc5a858d026cb907bb0954bec
7575
refs/tags/v0.24.0: b3cf61898d9c63d028fe088c14486721318d5fd5
76-
refs/heads/snehashah-bugfix: 540734e6e9bce69f47854d2aabfbe61f1ac53631
76+
refs/heads/snehashah-bugfix: cd10082ca18efc4375a7f0eb3c1660ad14e07ad2

branches/snehashah-bugfix/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolIntegrationTest.java

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,12 @@
1919
import static com.google.common.truth.Truth.assertThat;
2020

2121
import com.google.cloud.grpc.GrpcTransportOptions.ExecutorFactory;
22-
import com.google.common.util.concurrent.ListenableFuture;
2322
import java.util.ArrayList;
2423
import java.util.List;
2524
import java.util.concurrent.CountDownLatch;
2625
import java.util.concurrent.ScheduledExecutorService;
2726
import java.util.concurrent.ScheduledThreadPoolExecutor;
2827
import java.util.concurrent.TimeUnit;
29-
import java.util.concurrent.TimeoutException;
30-
import junit.framework.Assert;
3128
import org.junit.Before;
3229
import org.junit.BeforeClass;
3330
import org.junit.ClassRule;
@@ -173,17 +170,8 @@ public void closeAfterInitialCreateDoesNotBlockIndefinitely() throws Exception {
173170
}
174171

175172
@Test
176-
public void closeWhenSessionsActiveDoesNotBlockIndefinitely() throws Exception {
173+
public void closeWhenSessionsActiveFinishes() throws Exception {
177174
Session session = pool.getReadSession();
178-
ListenableFuture<Void> future = pool.closeAsync();
179-
try {
180-
future.get(5, TimeUnit.SECONDS);
181-
Assert.fail("Closure future should not have finished");
182-
} catch (TimeoutException e) {
183-
// expected
184-
}
185-
session.close();
186-
// Now pool should close.
187-
future.get();
175+
pool.closeAsync().get();
188176
}
189177
}

0 commit comments

Comments
 (0)