-
-
Notifications
You must be signed in to change notification settings - Fork 836
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
Non deterministic test failure #1042
Non deterministic test failure #1042
Conversation
This PR does require some extra review and second opinion on this approach, Credits for this solution -> vitest-dev/vitest#1692 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kb-0311 Please also fix the test that failed to cause this GitHub Action failure.
@palisadoes there is not a specific test that fails to throw this unhandled error. If any one test is failed then the |
Please explain some more. The same suite of tests always pass in the pull request workflow and then intermittently fails when it is rerun in the push to the repo after the merge. Why? This seems to be proving that there is a test that occasionally fails and your test is highlighting the flaw. Which other test should we be targeting? Please take a look at all the failed push actions to see whether you can find a culprit. If you have good reason to think this analysis is incorrect, please state it. This is not an area of strength for me. |
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## develop #1042 +/- ##
===========================================
+ Coverage 94.55% 94.98% +0.42%
===========================================
Files 154 154
Lines 9112 9014 -98
Branches 801 762 -39
===========================================
- Hits 8616 8562 -54
+ Misses 495 451 -44
Partials 1 1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@palisadoes yeah I got what you were saying now, Thankfully @xoldyckk cleared it up. Fixed that test suite. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xoldyckk At least these changes do work on my local machine, hopefully, it works on GitHub CI/CD as well. If it pops up again then there is something else to it. |
@kb-0311 Do you think the order matters here? Does this occur if uploadImage test runs before other tests and then one of the tests fails or vice versa? Idk if vitest runs tests one by one by going through directories and files sequentially or just one at a time randomly from anywhere. If it's random then it'd be better to check if the error persists for the following cases:-
You can pick any random test and run it together with uploadImage.spec.ts(i.e., two tests). Like this:-
Try running it many times. |
What kind of change does this PR introduce?
bugFix
Issue Number:
Fixes #1010
Did you add tests for your changes?
Yes
Snapshots/Videos:
If relevant, did you update the documentation?
Summary
Does this PR introduce a breaking change?
Probably not
Other information
Have you read the contributing guide?
Yes