diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryableInternalErrorTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryableInternalErrorTest.java index ee2cbe833f..41e9779c20 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryableInternalErrorTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryableInternalErrorTest.java @@ -30,6 +30,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; +import org.threeten.bp.Duration; @RunWith(JUnit4.class) public class RetryableInternalErrorTest extends AbstractMockServerTest { @@ -42,7 +43,11 @@ public void testTranslateInternalException() { .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) .setCredentials(NoCredentials.getInstance()) .setSessionPoolOption( - SessionPoolOptions.newBuilder().setMinSessions(1).setMaxSessions(1).build()) + SessionPoolOptions.newBuilder() + .setMinSessions(1) + .setMaxSessions(1) + .setWaitForMinSessions(Duration.ofSeconds(1)) + .build()) .build() .getService()) { DatabaseClient client = spanner.getDatabaseClient(DatabaseId.of("p", "i", "d"));