Skip to content

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

Merged
merged 4 commits into from
May 10, 2021

Conversation

igorbernstein2
Copy link
Contributor

  • 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
@igorbernstein2 igorbernstein2 requested a review from a team as a code owner May 7, 2021 19:40
@product-auto-label product-auto-label bot added the api: bigtable Issues related to the googleapis/java-bigtable API. label May 7, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label May 7, 2021
@igorbernstein2 igorbernstein2 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 7, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 7, 2021
@igorbernstein2 igorbernstein2 added the automerge Merge the pull request once unit tests and other checks pass. label May 7, 2021
@codecov
Copy link

codecov bot commented May 7, 2021

Codecov Report

Merging #801 (d6aab3e) into master (04f8ad4) will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             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     
Impacted Files Coverage Δ Complexity Δ
...om/google/cloud/bigtable/emulator/v2/Emulator.java 59.83% <0.00%> (-0.82%) 14.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 04f8ad4...d6aab3e. Read the comment docs.

@gcf-merge-on-green
Copy link

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.

@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label May 8, 2021
@igorbernstein2 igorbernstein2 merged commit 7a03622 into googleapis:master May 10, 2021
@igorbernstein2 igorbernstein2 deleted the admin-it-resources branch May 10, 2021 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the googleapis/java-bigtable API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants