Skip to content

Commit d399cbd

Browse files
committed
chore(spanner): verify env for skipping tests
1 parent 234c732 commit d399cbd

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

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

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,6 @@ public void testRandomizePositionQPSThreshold() {
284284
@Test
285285
public void testUseMultiplexedSession() {
286286
// skip these tests since this configuration can have dual behaviour in different test-runners
287-
System.out.println(SessionPoolOptions.newBuilder().build().getUseMultiplexedSession());
288-
System.out.println(SessionPoolOptions.newBuilder().build().getUseMultiplexedSessionForRW());
289-
System.out.println(System.getenv("GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS"));
290-
System.out.println(System.getenv("GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_FOR_RW"));
291-
System.out.println("Running test on Java version: " + System.getProperty("java.version"));
292287
assumeFalse(SessionPoolOptions.newBuilder().build().getUseMultiplexedSession());
293288
assertEquals(false, SessionPoolOptions.newBuilder().build().getUseMultiplexedSession());
294289
assertEquals(
@@ -309,11 +304,8 @@ public void testUseMultiplexedSession() {
309304
@Test
310305
public void testUseMultiplexedSessionForRW() {
311306
// skip these tests since this configuration can have dual behaviour in different test-runners
312-
System.out.println(SessionPoolOptions.newBuilder().build().getUseMultiplexedSession());
313-
System.out.println(SessionPoolOptions.newBuilder().build().getUseMultiplexedSessionForRW());
314-
System.out.println(System.getenv("GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS"));
315-
System.out.println(System.getenv("GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_FOR_RW"));
316-
System.out.println("Running test on Java version: " + System.getProperty("java.version"));
307+
assumeFalse(
308+
Boolean.parseBoolean(System.getenv("GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_FOR_RW")));
317309
assumeFalse(SessionPoolOptions.newBuilder().build().getUseMultiplexedSession());
318310
assumeFalse(SessionPoolOptions.newBuilder().build().getUseMultiplexedSessionForRW());
319311

0 commit comments

Comments
 (0)