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

Flaky: "msw-api/context/delay.test.ts" integration test #276

Closed
kettanaito opened this issue Jul 13, 2020 · 8 comments · Fixed by #316
Closed

Flaky: "msw-api/context/delay.test.ts" integration test #276

kettanaito opened this issue Jul 13, 2020 · 8 comments · Fixed by #316
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@kettanaito
Copy link
Member

Scope

Current behavior

Current deviation value (150 ms) is not sufficient to cover the random response time generated by ctx.delay().

Expected behavior

Integration test for implicit response delay passes. I recommend to setup a simple Shell script that would run that test numerous times (i.e. 100) and ensure all the runs pass.

Suggested solution

  • Increase the deviation amount to 200 ms.
@kettanaito kettanaito added the bug Something isn't working label Jul 13, 2020
@kettanaito
Copy link
Member Author

Hey, @JacobMGEvans! This is that flaky test issue we've been discussing on Discord. Please, feel free to take a look into it, if you have some spare time. I'd be thankful.

@kettanaito kettanaito added the good first issue Good for newcomers label Jul 21, 2020
@JacobMGEvans
Copy link
Contributor

Alright thanks! I will be able to take a look. Sorry for the delay I was experiences burnout pretty bad but I am back 😄

@cowboyd
Copy link
Contributor

cowboyd commented Jul 27, 2020

This is that flaky test issue we've been discussing on Discord.

@kettanaito where is the discord server? I didn't find a link anywhere in the README or on the doc site. Is it public?

@JacobMGEvans
Copy link
Contributor

This is that flaky test issue we've been discussing on Discord.

@kettanaito where is the discord server? I didn't find a link anywhere in the README or on the doc site. Is it public?

I got you @cowboyd https://discord.com/channels/715220730605731931/727558537919594506

@cowboyd
Copy link
Contributor

cowboyd commented Jul 27, 2020

Thanks @JacobMGEvans!, but I'm getting that the invite is invalid or expired. Is that channel link, not an invite link maybe?

@JacobMGEvans
Copy link
Contributor

Thanks @JacobMGEvans!, but I'm getting that the invite is invalid or expired. Is that channel link, not an invite link maybe?

Give me a minute.

@JacobMGEvans
Copy link
Contributor

JacobMGEvans commented Jul 27, 2020

https://kentcdodds.com/discord

@cowboyd This should work. The MSW is in one of the channels 😄

@kettanaito kettanaito changed the title Integration test for implicit realistic response delay is flaky Flaky: "msw-api/context/delay.test.ts" integration test Jul 28, 2020
@JacobMGEvans
Copy link
Contributor

JacobMGEvans commented Aug 1, 2020

So I ran the tests locally with a script about 100 times, it broke on the 150 deviations about 30% if the time pretty consistently. I tried running it on a faster machine to make sure it wasn't resources related and added Jest Workers to the pool, it was pretty much the same.
PR #316

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants