Skip to content

Commit

Permalink
Revert "Set setFailIfPoolExhausted in SessionPoolOptions for SpannerA…
Browse files Browse the repository at this point in the history
…ccessor" (#32694)

This reverts commit efee92b.
  • Loading branch information
manitgupta authored Oct 8, 2024
1 parent 0e86cf2 commit bcd785f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import com.google.cloud.spanner.DatabaseAdminClient;
import com.google.cloud.spanner.DatabaseClient;
import com.google.cloud.spanner.DatabaseId;
import com.google.cloud.spanner.SessionPoolOptions;
import com.google.cloud.spanner.Spanner;
import com.google.cloud.spanner.SpannerOptions;
import com.google.cloud.spanner.v1.stub.SpannerStubSettings;
Expand Down Expand Up @@ -233,9 +232,7 @@ static SpannerOptions buildSpannerOptions(SpannerConfig spannerConfig) {
if (credentials != null && credentials.get() != null) {
builder.setCredentials(credentials.get());
}
SessionPoolOptions sessionPoolOptions =
SessionPoolOptions.newBuilder().setFailIfPoolExhausted().build();
builder.setSessionPoolOption(sessionPoolOptions);

return builder.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package org.apache.beam.sdk.io.gcp.spanner;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
Expand Down Expand Up @@ -164,6 +163,5 @@ public void testBuildSpannerOptionsWithCredential() {
assertEquals("project", options.getProjectId());
assertEquals("test-role", options.getDatabaseRole());
assertEquals(testCredential, options.getCredentials());
assertNotNull(options.getSessionPoolOptions());
}
}

0 comments on commit bcd785f

Please sign in to comment.