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: handle flaky tests #853

Merged
merged 1 commit into from Aug 27, 2022
Merged

Conversation

anonrig
Copy link
Contributor

@anonrig anonrig commented Aug 27, 2022

I still believe fake-timers are the main issue behind this. There are still some other tests being flaky due to fake timers tickAsync. I opened a pull request to discuss a potential solution.

Steps I've taken:

  • Understand multiple tests were contradicting each other due to the same port number
  • Run the test couple of times, it was still flaky
  • Updated sinon fake timers and tap, since the only ambigious side of the test was the fake timers.
  • Found the following issue: Using SinonJs fakeTimers with Tap tapjs/tapjs#709
  • Changed for loop 10 times tickAsync(1000) with for loop 100 times with tickAsync(100). Which solved the issue on the retry-failed-services.js test.

Copy link
Collaborator

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit b7d5685 into mercurius-js:master Aug 27, 2022
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.

None yet

2 participants