Skip to content

Commit

Permalink
Spanner test fix (googleapis#1711)
Browse files Browse the repository at this point in the history

* Fixed a spanner test to only delete databases it created

* Fix indentation
  • Loading branch information
vkedia authored and rybosome committed Mar 9, 2017
1 parent f9ad815 commit 76e5a43
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,14 @@ public void listPagination() throws Exception {

String instanceId = testHelper.getInstanceId().getInstance();
for (String dbId : dbIds) {
dbAdminClient.createDatabase(instanceId, dbId, ImmutableList.<String>of()).waitFor();
dbs.add(dbAdminClient.createDatabase(instanceId, dbId, ImmutableList.<String>of())
.waitFor()
.getResult());
}
Page<Database> page = dbAdminClient.listDatabases(instanceId, Options.pageSize(1));
List<String> dbIdsGot = new ArrayList<>();
while (page != null) {
Database db = Iterables.getOnlyElement(page.getValues());
dbs.add(db);
dbIdsGot.add(db.getId().getDatabase());
page = page.getNextPage();
}
Expand Down

0 comments on commit 76e5a43

Please sign in to comment.