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

Created on 13 Jul 2020  路  8Comments  路  Source: mswjs/msw

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.
bug good first issue

Most helpful comment

https://kentcdodds.com/discord

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

All 8 comments

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.

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

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?

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

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

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.

https://kentcdodds.com/discord

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PritamSangani picture PritamSangani  路  3Comments

otaciliolacerda picture otaciliolacerda  路  3Comments

derekr picture derekr  路  3Comments

dashed picture dashed  路  3Comments

kettanaito picture kettanaito  路  3Comments