-
Notifications
You must be signed in to change notification settings - Fork 25
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
Timeout can take longer than defined #464
Comments
Oh, you are right! I'm pretty busy these days but I try to jump on a fix as soon as possible!! Thank you so much for digging into the problem 😊 |
Hey @NoriSte, I believe that I have come up with a fix for this. Would it be possible for me to be granted access so I can raise a PR? |
Thank you!! Dumb question: doesn't GitHub allow you to follow the standard contribution process? That is
? |
Not a dumb question at all! Thanks for patiently explaining it to me. This is my first time pushing a fix to an open repo I think it's because I cloned rather than forked. Let me try again :) |
Figured it out! PR here: #465 I've tested against my own project using Cypress, but I wasn't able to get results from running |
…tion Before this commit, the number of retries was calculated ignoring the checkFunction duration. As a result, a 5s timeout with a 0.5s interval resulted in 10 retries. If the checkFunction takes 10 seconds, 10 retries mean waiting for 100 seconds, violating the 5s timeout. This commit fixes the problem by checking, after each checkFunction invocation, what is the elapsed time and stops retrying in case the timeout is over. BREAKING CHANGE: The timeout is now respected even if checkFunction takes a long time. As a result, you could face that your checkFunction runs less times. fix NoriSte#464
🎉 This issue has been resolved in version 2.0.0 🎉 |
Love this plugin, has been so useful! However, there's something that was puzzling me for ages.
I couldn't understand why my
waitUntil()
function was set to time out after 60000ms, but was taking longer than two minutes to fail.It's because this line doesn't factor in the time that it takes to perform an action.
So if I have the following config:
and I'm looping an API call that takes 1s to resolve, it'll perform that call 60 times, with a 1 second interval between. Hence a one minute timeout takes two minutes.
The text was updated successfully, but these errors were encountered: