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 race condition between test and teardown #38

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

lpsinger
Copy link
Member

@lpsinger lpsinger commented Nov 7, 2023

Promise.all is not safe to use in a test that requires some of the promises to reject, because Promise.all rejects upon the first promise to fail, and the other promises may complete after the test itself has already finished.

Promise.all is not safe to use in a test that requires some of the
promises to reject, because Promise.all rejects upon the _first_
promise to fail, and the other promises may complete after the test
itself has already finished.
Copy link

codecov bot commented Nov 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (dab93d3) 100.00% compared to head (01de1d1) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #38   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           41        41           
  Branches         7         7           
=========================================
  Hits            41        41           

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

@dakota002 dakota002 merged commit 4ec63e1 into nasa-gcn:main Nov 8, 2023
8 of 9 checks passed
@lpsinger lpsinger deleted the promise-all-race-with-teardown branch November 8, 2023 10:48
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.

2 participants