-
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
Changing the timeout logic. #465
Conversation
Hi @NoriSte, how does this look to you? I've tested against my own project using Cypress and all was fine, but I wasn't able to get results from running |
Hey Liam!!! Anyway: I just pushed on the |
54a4ff8
to
03ab223
Compare
The tests could be
These tests should fail if written and added on the
Sure, let me know if you prefer to give up since you already dedicated some time here 😊 |
Great suggestions! I'll look into adding those 😊 |
Hi again! I've added a couple of scenarios that fail on master and pass on my branch. Happy to add more if any edge cases have occurred to you |
…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
f3cf11a
to
b6fc554
Compare
Thaaank you so much I just force-pushed a commit message which includes all the details 😊 |
@all-contributors please add @liambutler for code and test |
I've put up a pull request to add @liambutler! 🎉 |
🎉 This PR has been released in version 2.0.0 🎉 |
Thank you so much @liambutler !!!! 🤗 |
Uhm... I made only a mistake... by force-pushing the commit you do not result as the author anymore. So even if I added you to the "all-contributor" file, the contribution does not show up in your timeline 😞 I'm sorry, I was not aware of it 😞 |
Not a problem at all! I'm just glad it's fixed |
Resolves issue #464
By moving away from a retry countdown and instead using a timestamp comparison on each iteration,
waitUntil()
should timeout closer to the user-defined timeout.