This repository was archived by the owner on Apr 7, 2026. It is now read-only.
test: only use one backup for integration test#1581
Merged
gcf-merge-on-green[bot] merged 24 commits intomainfrom Jan 10, 2022
Merged
test: only use one backup for integration test#1581gcf-merge-on-green[bot] merged 24 commits intomainfrom
gcf-merge-on-green[bot] merged 24 commits intomainfrom
Conversation
Restore operations cannot be cancelled, so we need to ignore any errors returned from cancelling the operation, and we need to wait for the restore operation to finish before we can delete the backup.
thiagotnunes
approved these changes
Jan 5, 2022
| boolean allDbOpsDone = false; | ||
| while (!allDbOpsDone) { | ||
| allDbOpsDone = true; | ||
| assertNotNull(backupMetadata.getProto()); |
Contributor
There was a problem hiding this comment.
Should this be pushed outside of the while loop, since we only update the backupMetadata in the beginning of the try block?
Collaborator
Author
There was a problem hiding this comment.
Yeah, good point. Done.
| logger.info(String.format("Creating test database %s", db1Id)); | ||
| OperationFuture<Database, CreateDatabaseMetadata> dbOp1 = | ||
| logger.info(String.format("Creating test database %s", databaseId)); | ||
| OperationFuture<Database, CreateDatabaseMetadata> dbOp = |
Contributor
There was a problem hiding this comment.
nit: dbOp -> databaseOperation
| // List all backups. | ||
| logger.info("Listing all backups"); | ||
| assertThat(instance.listBackups().iterateAll()).containsAtLeast(backup1, backup2); | ||
| assertThat(instance.listBackups().iterateAll()).contains(backup); |
Contributor
There was a problem hiding this comment.
nit: replace assertThat by assertEquals, assertTrue, ...
Collaborator
Author
There was a problem hiding this comment.
Done, here and elsewhere in this file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes the integration test for backups to only create one backup to reduce the probability of a build timeout, and increases the build timeout for the
SlowTestexecution to 7,200 seconds.Fixes #1436