-
Notifications
You must be signed in to change notification settings - Fork 97
chore(test): improve resource handling in tests #801
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
chore(test): improve resource handling in tests #801
Conversation
igorbernstein2
commented
May 7, 2021
- fix resource cleanup: time based resource cleanup expected a prefix followed by a number, but some tests inserted a string in between which would prevent clean. Now all prefixes are generated in a single place
- fix cleanup contention: concurrent tests will try to cleanup resources at the same time. Mitigate this by swallowing not found error
- fix concurrent test runs: the prefix was based on time only, which would causes tests running in the same second to clobber each other
- optimize backup test to only create a single new instance
* fix resource cleanup: time based resource cleanup expected a prefix followed by a number, but some tests inserted a string in between which would prevent clean. Now all prefixes are generated in a single place * fix cleanup contention: concurrent tests will try to cleanup resources at the same time. Mitigate this by swallowing not found error * fix concurrent test runs: the prefix was based on time only, which would causes tests running in the same second to clobber each other * optimize backup test to only create a single new instance
google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableBackupIT.java
Show resolved
Hide resolved
google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableBackupIT.java
Outdated
Show resolved
Hide resolved
...cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/AbstractTestEnv.java
Show resolved
Hide resolved
...cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/AbstractTestEnv.java
Outdated
Show resolved
Hide resolved
...cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/AbstractTestEnv.java
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #801 +/- ##
============================================
- Coverage 83.47% 83.46% -0.02%
Complexity 1315 1315
============================================
Files 114 114
Lines 7806 7806
Branches 446 446
============================================
- Hits 6516 6515 -1
- Misses 1034 1036 +2
+ Partials 256 255 -1
Continue to review full report at Codecov.
|
Merge-on-green attempted to merge your PR for 6 hours, but it was not mergeable because either one of your required status checks failed, one of your required reviews was not approved, or there is a do not merge label. Learn more about your required status checks here: https://help.github.com/en/github/administering-a-repository/enabling-required-status-checks. You can remove and reapply the label to re-run the bot. |