Skip to content

Commit 8b14750

Browse files
committed
fix: wait for session pool to initialize
1 parent 5109f13 commit 8b14750

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import org.junit.Test;
3131
import org.junit.runner.RunWith;
3232
import org.junit.runners.JUnit4;
33+
import org.threeten.bp.Duration;
3334

3435
@RunWith(JUnit4.class)
3536
public class RetryableInternalErrorTest extends AbstractMockServerTest {
@@ -42,7 +43,11 @@ public void testTranslateInternalException() {
4243
.setChannelConfigurator(ManagedChannelBuilder::usePlaintext)
4344
.setCredentials(NoCredentials.getInstance())
4445
.setSessionPoolOption(
45-
SessionPoolOptions.newBuilder().setMinSessions(1).setMaxSessions(1).build())
46+
SessionPoolOptions.newBuilder()
47+
.setMinSessions(1)
48+
.setMaxSessions(1)
49+
.setWaitForMinSessions(Duration.ofSeconds(1))
50+
.build())
4651
.build()
4752
.getService()) {
4853
DatabaseClient client = spanner.getDatabaseClient(DatabaseId.of("p", "i", "d"));

0 commit comments

Comments
 (0)