Skip to content

chore: fix net stubbing flake#20297

Merged
ryanthemanuel merged 4 commits into
developfrom
ryanm/chore/fix-net-stubbing-flakes
Feb 23, 2022
Merged

chore: fix net stubbing flake#20297
ryanthemanuel merged 4 commits into
developfrom
ryanm/chore/fix-net-stubbing-flakes

Conversation

@ryanthemanuel
Copy link
Copy Markdown
Collaborator

@ryanthemanuel ryanthemanuel commented Feb 21, 2022

User facing changelog

n/a

Additional details

The net_stubbing test should delay the same amount on every response has been flaky. It typically fails because the delay ends up being slightly over the acceptable buffer of 50 ms.

The other tests in this file handle the buffer slightly differently giving a window of 200 ms by saying the actual delay needs to be within (delay + 100 +/- 100). I updated this test (which is really just testing that each subsequent interception also applies the delay) to do the same and it seems to be passing more consistently. It's worth noting that the delay specified is a "minimum" and not really intended to be super accurate (https://docs.cypress.io/api/commands/intercept#Response-object-properties).

How has the user experience changed?

n/a

PR Tasks

  • Have tests been added/updated?
  • [na] Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • [na] Has a PR for user-facing changes been opened in cypress-documentation?
  • [na] Have API changes been updated in the type definitions?
  • [na] Have new configuration options been added to the cypress.schema.json?

@cypress-bot
Copy link
Copy Markdown
Contributor

cypress-bot Bot commented Feb 21, 2022

Thanks for taking the time to open a PR!

@cypress
Copy link
Copy Markdown

cypress Bot commented Feb 21, 2022



Test summary

19278 0 218 0Flakiness 4


Run details

Project cypress
Status Passed
Commit ca8231e
Started Feb 23, 2022 2:23 PM
Ended Feb 23, 2022 2:34 PM
Duration 11:44 💡
OS Linux Debian - 10.10
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

net_stubbing_spec.ts Flakiness
1 network stubbing > waiting and aliasing > can timeout waiting on a single request using "alias.request"
2 network stubbing > waiting and aliasing > can timeout waiting on a single request using "alias.request"
3 network stubbing > waiting and aliasing > can timeout waiting on a single request using "alias.request"
xhr_spec.js Flakiness
1 ... > can alias a route without stubbing it

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@ryanthemanuel ryanthemanuel marked this pull request as ready for review February 21, 2022 20:39
@ryanthemanuel ryanthemanuel requested a review from a team as a code owner February 21, 2022 20:39
@ryanthemanuel ryanthemanuel requested review from jennifer-shehane and removed request for a team and jennifer-shehane February 21, 2022 20:39
@flotwig flotwig requested review from BlueWinds and flotwig February 22, 2022 16:39
@ryanthemanuel ryanthemanuel merged commit 05f9ad1 into develop Feb 23, 2022
@ryanthemanuel ryanthemanuel deleted the ryanm/chore/fix-net-stubbing-flakes branch February 23, 2022 16:46
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.

4 participants