From 7716d7379b5b25e6cd2640c077bfb268b6692822 Mon Sep 17 00:00:00 2001 From: Vikas Kedia Date: Wed, 8 Mar 2017 21:00:26 +0530 Subject: [PATCH] Spanner test fix (#1711) * Fixed a spanner test to only delete databases it created * Fix indentation --- .../com/google/cloud/spanner/it/ITDatabaseAdminTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDatabaseAdminTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDatabaseAdminTest.java index 82bf2bd3f6bf..f4e994c79407 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDatabaseAdminTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDatabaseAdminTest.java @@ -164,13 +164,14 @@ public void listPagination() throws Exception { String instanceId = testHelper.getInstanceId().getInstance(); for (String dbId : dbIds) { - dbAdminClient.createDatabase(instanceId, dbId, ImmutableList.of()).waitFor(); + dbs.add(dbAdminClient.createDatabase(instanceId, dbId, ImmutableList.of()) + .waitFor() + .getResult()); } Page page = dbAdminClient.listDatabases(instanceId, Options.pageSize(1)); List dbIdsGot = new ArrayList<>(); while (page != null) { Database db = Iterables.getOnlyElement(page.getValues()); - dbs.add(db); dbIdsGot.add(db.getId().getDatabase()); page = page.getNextPage(); }