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 error when tests run in parallel. #221

Merged
merged 1 commit into from
Dec 29, 2023
Merged

Fix error when tests run in parallel. #221

merged 1 commit into from
Dec 29, 2023

Conversation

graebm
Copy link
Contributor

@graebm graebm commented Dec 29, 2023

Issue:
Rare chance of failure when tests run in parallel.

The issue was that many tests need to write, then read, an SSO token file at $HOME/.aws/sso/cache/<xyz>.json. But if multiple tests run in parallel, they could each write different stuff to that file, and then read the contents that some OTHER test put there.

Description of changes:
Each test creates a random tmp directory and uses that as $HOME

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (baeffa7) 79.44% compared to head (9107251) 79.51%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #221      +/-   ##
==========================================
+ Coverage   79.44%   79.51%   +0.06%     
==========================================
  Files          33       33              
  Lines        5798     5798              
==========================================
+ Hits         4606     4610       +4     
+ Misses       1192     1188       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@graebm graebm merged commit a8a62d6 into main Dec 29, 2023
29 checks passed
@graebm graebm deleted the fix-parallel-tests branch December 29, 2023 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants