-
Notifications
You must be signed in to change notification settings - Fork 156
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
Siteprism hangs when used with timecop #388
Comments
I know previously we've had some As mentioned in the original Issue request, browser integration tests should never have frozen time. Whereas maybe stubbing it in specs is fine (However we do have some time management unit tests also which may have issues with this) Both of your points are completely valid, and I'm happy to listen to PR's for them. At the moment I'm deep inside a couple of gritty features (Which are on the repo and have been for a while), so I'd prefer to keep my focus on tackling these. https://github.com/teamcapybara/capybara/pull/2032/files - This is the PR which is being experimented with to prevent time freezes. Caveats to my acceptance of your above ideas are...
I'll also happily listen to a listener-poll inside the Hopefully that's given you a few nuggets of wisdom to debate. But at the moment I wouldn't be able to commit to coding it. If you or others watching are then I'm all for extra functionality / guards. |
Thanks for the quick response! I like the idea of checking in the Also, somewhat related, I thought about this a little and realized it's really a bigger issue and could be addressed with a rubocop cop. I did some searching and found this: rubocop/rubocop-rails#38 |
Closed by b68171a |
I've just discovered an issue with interactions between site_prism and timecop. It looks like this is a known issue (#88), which was closed (completely reasonably).
To describe the issue again here: If you are using timecop with
Timecop.freeze
somewhere in your code (either in the feature/system test, or in another test with leakage),Waiter.wait_until_true
will hang becauseTime.now
does not change.This actually isn't a bug with Site Prism, but I just spent a few hours tracking this down, so I wanted to create an issue, to hopefully avoid this issue for others in the future. At the very least, I'm hoping this issue will come up in a Google search, but I'm also wondering if there's some documentation or messaging we could add that might help as well.
My two thoughts:
Timecop
and if it's there, just output some logging that says something like "fyi, you're using timecop"The text was updated successfully, but these errors were encountered: