Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.cloud.spanner.it;

import static com.google.common.base.Strings.isNullOrEmpty;
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertThrows;
import static org.junit.Assume.assumeTrue;
Expand Down Expand Up @@ -66,22 +65,14 @@ public static List<DialectTestParameter> data() {

private static DatabaseClient client;

private static boolean isUsingCloudDevel() {
String jobType = System.getenv("JOB_TYPE");

// Assumes that the jobType contains the string "cloud-devel" to signal that
// the environment is cloud-devel.
return !isNullOrEmpty(jobType) && jobType.contains("cloud-devel");
}

private Struct readRow(String queue, Key key, String... columns) {
return client.singleUse(TimestampBound.strong()).readRow(queue, key, Arrays.asList(columns));
}

@BeforeClass
public static void setUpTestSuite() {
// TODO: remove once the feature is fully enabled in prod
assumeTrue("Queue is currently only supported in cloud-devel", isUsingCloudDevel());
assumeTrue("Queue tests are temporarily disabled", false);
Database googleStandardSQLDatabase =
env.getTestHelper().createTestDatabase(GOOGLE_STANDARD_SQL_SCHEMA);
googleStandardSQLClient = env.getTestHelper().getDatabaseClient(googleStandardSQLDatabase);
Expand Down
Loading