-
Notifications
You must be signed in to change notification settings - Fork 251
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
test: implement polling and retries in test #731
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
patches/msw+2.2.10.patch
Outdated
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.
@@ -113,7 +113,7 @@ export async function uploadPartWithProgress( | |||
// Add a delay before retrying (exponential backoff can be used) | |||
const delay = Math.pow(2, retryCount) * 1000; | |||
await new Promise((res) => setTimeout(res, delay)); | |||
await uploadPartWithProgress(opts, retryCount + 1); // Retry the request | |||
resolve(await uploadPartWithProgress(opts, retryCount + 1)); // Retry the request |
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.
how funny that when validating the new solution i think i found a bug in the current solution xddd
the promise never resolved if it retried so it just hang forever 😅
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.
😅
Upstream PR (mswjs/msw#2108) looks fine, some incompatiblities with older ts versions but fine to merge for now with patch i think |
more tests to improve confidence of Effect rewrite