File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
google-cloud-spanner/src/test/java/com/google/cloud/spanner Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ public static void stopServer() throws InterruptedException {
207
207
public void setUp () throws InterruptedException {
208
208
mockSpanner .reset ();
209
209
if (spanner == null
210
- || spanner .getOptions ().getSessionPoolOptions ().isFailIfPoolExhausted ()
210
+ || spanner .getOptions ().getSessionPoolOptions ().isFailIfSessionNotFound ()
211
211
!= failOnInvalidatedSession ) {
212
212
if (spanner != null ) {
213
213
spanner .close ();
@@ -228,8 +228,8 @@ public void setUp() throws InterruptedException {
228
228
.build ()
229
229
.getService ();
230
230
client = spanner .getDatabaseClient (DatabaseId .of ("[PROJECT]" , "[INSTANCE]" , "[DATABASE]" ));
231
- invalidateSessionPool (client , spanner .getOptions ().getSessionPoolOptions ().getMinSessions ());
232
231
}
232
+ invalidateSessionPool (client , spanner .getOptions ().getSessionPoolOptions ().getMinSessions ());
233
233
}
234
234
235
235
private static void invalidateSessionPool (DatabaseClient client , int minSessions )
@@ -1002,6 +1002,7 @@ public void transactionManagerBatchUpdate() throws InterruptedException {
1002
1002
} catch (AbortedException e ) {
1003
1003
transaction = assertThrowsSessionNotFoundIfShouldFail (() -> manager .resetForRetry ());
1004
1004
if (transaction == null ) {
1005
+ manager .close ();
1005
1006
break ;
1006
1007
}
1007
1008
}
You can’t perform that action at this time.
0 commit comments