-
Notifications
You must be signed in to change notification settings - Fork 3
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
Resolving requests times out #17
Comments
I have tried to look into this a little deeper myself but I cannot figure out exactly what request(s) in my test cannot be resolved within reasonable time. With Another option would be to introduce a separate configurable timeout which if provided is used specifically for request resolving. |
This part of the code attempts to wait for all pending requests to complete before writing the fixture file. This prevents requests that are in progress from being skipped by the recording process and potentially going to the origin when replaying. Short of there being a bug, it's possible that after all the assertions have been made for your test case, you either have a long running request that is not completing or perhaps some kind of overlapping polling that is continually pushing new requests to the collection that are taking additional time to resolve. I like your proposal, we could perhaps even just nominate a higher default timeout specifically for resolving the request collection. I'm curious if you were able to diagnose exactly what kind of requests were causing this timeout and what timeout ended up working? |
I have not been able to diagnose what requests were causing the timeout. My approach at the moment has been to log requests as they are intercepted and after a response has been returned. Without further modification the number of intercepted requests is higher than the number of resolved requests. When I bumped the All tests pass as expected before using I am fine with with either a configurable or higher default timeout for this and I am willing to help out with implementation as well if possible. |
Thanks for sharing
cypress-replay
!I tried it out in a project but with the latest version I get the following error when in record mode:
I cannot tell why this occurs. It seemed like request resolving was introduced with #14. I then tried to downgrade to the latest version before the change in #14, 1.0.14. In this version the problem does not occur.
I am testing with Cypress 9.6.1.
The text was updated successfully, but these errors were encountered: