File tree Expand file tree Collapse file tree
branches/snehashah-bugfix/google-cloud-spanner/src/test/java/com/google/cloud/spanner Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,4 +73,4 @@ refs/heads/vkedia-patch-3: 4d128043acaa7db9160faf439d2ca6104e8a88cb
7373refs/tags/v0.23.0: e5405e1f6d144441b889acd3b6405fdcc3cdfd72
7474refs/tags/v0.23.1: 30bcf8076ef9d71cc5a858d026cb907bb0954bec
7575refs/tags/v0.24.0: b3cf61898d9c63d028fe088c14486721318d5fd5
76- refs/heads/snehashah-bugfix: 540734e6e9bce69f47854d2aabfbe61f1ac53631
76+ refs/heads/snehashah-bugfix: cd10082ca18efc4375a7f0eb3c1660ad14e07ad2
Original file line number Diff line number Diff line change 1919import static com .google .common .truth .Truth .assertThat ;
2020
2121import com .google .cloud .grpc .GrpcTransportOptions .ExecutorFactory ;
22- import com .google .common .util .concurrent .ListenableFuture ;
2322import java .util .ArrayList ;
2423import java .util .List ;
2524import java .util .concurrent .CountDownLatch ;
2625import java .util .concurrent .ScheduledExecutorService ;
2726import java .util .concurrent .ScheduledThreadPoolExecutor ;
2827import java .util .concurrent .TimeUnit ;
29- import java .util .concurrent .TimeoutException ;
30- import junit .framework .Assert ;
3128import org .junit .Before ;
3229import org .junit .BeforeClass ;
3330import 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}
You can’t perform that action at this time.
0 commit comments