Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: drop databases after sample tests #1401

Merged
merged 1 commit into from Sep 1, 2021

Conversation

thiagotnunes
Copy link
Contributor

There was a bug on dropping databases / deleting backups after the sample tests where we were trying to delete in the regional instance first and if an exception was thrown, we would try to delete on the second instance. This did not work, because the delete / drop operations do not fail if the database / backup are not found in the instance, the call simply returns.

In this PR we have applied both deletes one after the other to fix the issue, instead of relying on the exceptions.

There was a bug on dropping databases / deleting backups after the
sample tests where we were trying to delete in the regional instance
first and if an exception was thrown, we would try to delete on the
second instance. This did not work, because the delete / drop operations
do not fail if the database / backup are not found in the instance, the
call simply returns.

In this PR we have applied both deletes one after the other to fix the
issue, instead of relying on the exceptions.
@thiagotnunes thiagotnunes requested a review from a team as a code owner August 31, 2021 23:59
@product-auto-label product-auto-label bot added api: spanner Issues related to the googleapis/java-spanner API. samples Issues that are directly related to samples. labels Aug 31, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 31, 2021
@thiagotnunes thiagotnunes added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 1, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 1, 2021
@thiagotnunes thiagotnunes merged commit c9f5048 into master Sep 1, 2021
@thiagotnunes thiagotnunes deleted the fix-samples-drop-databases branch September 1, 2021 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/java-spanner API. cla: yes This human has signed the Contributor License Agreement. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants