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 flaky test #1982

Merged
merged 2 commits into from
Jan 30, 2023
Merged

✅ fix flaky test #1982

merged 2 commits into from
Jan 30, 2023

Conversation

BenoitZugmeyer
Copy link
Member

@BenoitZugmeyer BenoitZugmeyer commented Jan 30, 2023

Motivation

This particular test is quite flaky.

FMU, it was assuming that Promise.resolve took less than 1ms. But this was often not the case, and the setTimeout callback was called too often.

Changes

By using collectAsyncCalls, we remove this race condition.

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@BenoitZugmeyer BenoitZugmeyer requested a review from a team as a code owner January 30, 2023 09:38
@BenoitZugmeyer BenoitZugmeyer marked this pull request as draft January 30, 2023 09:56
FMU, this test was assuming that `Promise.resolve` took less than 1ms.
But this was often failing, and the `setTimeout` callback was called too
often.

By using `collectAsyncCalls`, we remove this race condition.
@BenoitZugmeyer BenoitZugmeyer marked this pull request as ready for review January 30, 2023 10:44
@BenoitZugmeyer BenoitZugmeyer requested a review from a team as a code owner January 30, 2023 10:44
@BenoitZugmeyer BenoitZugmeyer merged commit 4ec9630 into main Jan 30, 2023
@BenoitZugmeyer BenoitZugmeyer deleted the benoit/fix-flaky-test branch January 30, 2023 14:32
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