Skip to content

Commit 8608191

Browse files
committed
chore(spanner): add env to verify tests
1 parent cfae568 commit 8608191

File tree

6 files changed

+9
-3
lines changed

6 files changed

+9
-3
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jobs:
5454
JOB_TYPE: test
5555
GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS: true
5656
GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_PARTITIONED_OPS: true
57+
GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_FOR_RW: true
5758
units-java8:
5859
# Building using Java 17 and run the tests with Java 8 runtime
5960
name: "units (8)"
@@ -94,6 +95,7 @@ jobs:
9495
JOB_TYPE: test
9596
GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS: true
9697
GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_PARTITIONED_OPS: true
98+
GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_FOR_RW: true
9799
windows:
98100
runs-on: windows-latest
99101
steps:

.github/workflows/integration-tests-against-emulator-with-multiplexed-session.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ jobs:
4040
JOB_TYPE: test
4141
SPANNER_EMULATOR_HOST: localhost:9010
4242
GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS: true
43+
GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_FOR_RW: true

.kokoro/presubmit/integration-multiplexed-sessions-enabled.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,8 @@ env_vars: {
4141
key: "GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_PARTITIONED_OPS"
4242
value: "true"
4343
}
44+
45+
env_vars: {
46+
key: "GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_FOR_RW"
47+
value: "true"
48+
}

google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPoolOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ private static Boolean parseBooleanEnvVariable(String variableName) {
390390
private static Boolean getUseMultiplexedSessionForRWFromEnvVariable() {
391391
// Checks the value of env, GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_FOR_RW
392392
// This returns null until RW is supported.
393-
return null;
393+
return parseBooleanEnvVariable("GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_FOR_RW");
394394
}
395395

396396
Duration getMultiplexedSessionMaintenanceDuration() {

google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ITAbstractSpannerTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import com.google.cloud.spanner.GceTestEnvConfig;
2323
import com.google.cloud.spanner.IntegrationTestEnv;
2424
import com.google.cloud.spanner.ResultSet;
25-
import com.google.cloud.spanner.Spanner;
2625
import com.google.cloud.spanner.SpannerExceptionFactory;
2726
import com.google.cloud.spanner.SpannerOptions;
2827
import com.google.cloud.spanner.Statement;

google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/OpenTelemetryTracingTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import static org.junit.Assert.assertEquals;
2121
import static org.junit.Assert.assertFalse;
2222
import static org.junit.Assert.assertTrue;
23-
import static org.junit.Assume.assumeFalse;
2423

2524
import com.google.cloud.spanner.MockSpannerServiceImpl;
2625
import com.google.cloud.spanner.ResultSet;

0 commit comments

Comments
 (0)