This repository was archived by the owner on Apr 7, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
main/java/com/google/cloud/spanner
test/java/com/google/cloud/spanner Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1557,20 +1557,14 @@ public Builder setExperimentalHost(String host) {
15571557 return this ;
15581558 }
15591559
1560- /**
1561- * Enables gRPC-GCP extension with the default settings. Do not set
1562- * GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS to true in combination with this option, as
1563- * Multiplexed sessions are not supported for gRPC-GCP.
1564- */
1560+ /** Enables gRPC-GCP extension with the default settings. */
15651561 public Builder enableGrpcGcpExtension () {
15661562 return this .enableGrpcGcpExtension (null );
15671563 }
15681564
15691565 /**
15701566 * Enables gRPC-GCP extension and uses provided options for configuration. The metric registry
1571- * and default Spanner metric labels will be added automatically. Do not set
1572- * GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS to true in combination with this option, as
1573- * Multiplexed sessions are not supported for gRPC-GCP.
1567+ * and default Spanner metric labels will be added automatically.
15741568 */
15751569 public Builder enableGrpcGcpExtension (GcpManagedChannelOptions options ) {
15761570 this .grpcGcpExtensionEnabled = true ;
Original file line number Diff line number Diff line change 2020import static io .grpc .Grpc .TRANSPORT_ATTR_REMOTE_ADDR ;
2121import static org .junit .Assert .assertEquals ;
2222import static org .junit .Assert .assertTrue ;
23- import static org .junit .Assume .assumeFalse ;
2423
2524import com .google .cloud .NoCredentials ;
2625import com .google .cloud .spanner .MockSpannerServiceImpl .StatementResult ;
@@ -212,9 +211,6 @@ private SpannerOptions createSpannerOptions() {
212211 public void testUsesAllChannels () throws InterruptedException {
213212 final int multiplier = 2 ;
214213 try (Spanner spanner = createSpannerOptions ().getService ()) {
215- assumeFalse (
216- "GRPC-GCP is currently not supported with multiplexed sessions" ,
217- isMultiplexedSessionsEnabled (spanner ));
218214 DatabaseClient client = spanner .getDatabaseClient (DatabaseId .of ("p" , "i" , "d" ));
219215 ListeningExecutorService executor =
220216 MoreExecutors .listeningDecorator (Executors .newFixedThreadPool (numChannels * multiplier ));
@@ -244,11 +240,4 @@ public void testUsesAllChannels() throws InterruptedException {
244240 }
245241 assertEquals (numChannels , executeSqlLocalIps .size ());
246242 }
247-
248- private boolean isMultiplexedSessionsEnabled (Spanner spanner ) {
249- if (spanner .getOptions () == null || spanner .getOptions ().getSessionPoolOptions () == null ) {
250- return false ;
251- }
252- return spanner .getOptions ().getSessionPoolOptions ().getUseMultiplexedSession ();
253- }
254243}
You can’t perform that action at this time.
0 commit comments