Search in sources :

Example 1 with RemoteSpannerHelper

use of com.google.cloud.spanner.testing.RemoteSpannerHelper in project google-cloud-java by GoogleCloudPlatform.

the class ITReadTest method invalidDatabase.

@Test
public void invalidDatabase() {
    RemoteSpannerHelper helper = env.getTestHelper();
    DatabaseClient invalidClient = helper.getClient().getDatabaseClient(DatabaseId.of(helper.getInstanceId(), "invalid"));
    expectedException.expect(isSpannerException(ErrorCode.NOT_FOUND));
    invalidClient.singleUse(TimestampBound.strong()).readRow(TABLE_NAME, Key.of("k99"), ALL_COLUMNS);
}
Also used : DatabaseClient(com.google.cloud.spanner.DatabaseClient) RemoteSpannerHelper(com.google.cloud.spanner.testing.RemoteSpannerHelper) IntegrationTest(com.google.cloud.spanner.IntegrationTest) Test(org.junit.Test)

Aggregations

DatabaseClient (com.google.cloud.spanner.DatabaseClient)1 IntegrationTest (com.google.cloud.spanner.IntegrationTest)1 RemoteSpannerHelper (com.google.cloud.spanner.testing.RemoteSpannerHelper)1 Test (org.junit.Test)1