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: prevent cy.route2 callback timeouts from leaking into next test #8727

Merged
merged 2 commits into from Oct 3, 2020

Conversation

flotwig
Copy link
Contributor

@flotwig flotwig commented Oct 1, 2020

  • Closes

User facing changelog

  • Fixed a bug in cy.route2 where route handler timeouts could leak into other tests and cause random failures.

Additional details

  • this was a major source of flake in the net-stubbing tests - timeouts for the req/res callbacks could leak between tests, and not all of the tests were designed to resolve within defaultCommandTimeout
  • this is why there were random clusters of tests that would be flakier than others!
  • additionally addressed a few other flaky tests
  • added retries to one flaky test which i am unable to reproduce locally despite running many many times

How has the user experience changed?

PR Tasks

  • Have tests been added/updated?
  • Has the original issue been tagged with a release in ZenHub?
  • [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
Contributor

cypress-bot bot commented Oct 1, 2020

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented Oct 1, 2020



Test summary

3817 0 55 1


Run details

Project cypress
Status Passed
Commit b47a040
Started Oct 1, 2020 9:53 PM
Ended Oct 1, 2020 10:03 PM
Duration 10:39 💡
OS Linux Debian - 10.2
Browser Firefox 77

View run in Cypress Dashboard ➡️


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

Copy link
Contributor

@JessicaSachs JessicaSachs left a comment

Choose a reason for hiding this comment

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

This seems straightforward to me.

I'm curious if Cypress.state('test') ever changes when it's not the same test -- e.g. with property modifications such that you can't === to check identity.

I'm also curious why you removed the .should('be.visible') check. Because it was flaking?

@flotwig
Copy link
Contributor Author

flotwig commented Oct 3, 2020

Yeah, I'm not sure why the be.visible check was failing, but changing it to just cy.contains eliminated the flake.

@flotwig flotwig merged commit 4d76049 into develop Oct 3, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Oct 14, 2020

Released in 5.4.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v5.4.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Oct 14, 2020
@flotwig flotwig deleted the net-stubbin-flake branch January 24, 2022 18:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants