Merged
Changes from all commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Failed to load files.
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,6 +19,7 @@
import static com.google.common.truth.Truth.assertThat;

import com.google.cloud.Timestamp;
import com.google.cloud.spanner.Backup;
import com.google.cloud.spanner.BackupId;
import com.google.cloud.spanner.Database;
import com.google.cloud.spanner.DatabaseAdminClient;
Expand DownExpand Up@@ -448,6 +449,11 @@ public void testEncryptedDatabaseAndBackupSamples() throws Exception {
projectId, instanceId, encryptedDatabaseId, projectId, instanceId, encryptedRestoreId,
projectId, instanceId, encryptedBackupId, key));
} finally {
// Delete the backups from the test instance first, as the instance can only be deleted once
// all backups have been deleted.
for (Backup backup : dbClient.listBackups(instanceId).iterateAll()) {
backup.delete();
}
instanceAdminClient.deleteInstance(instanceId);
}
}
Expand Down