-
Notifications
You must be signed in to change notification settings - Fork 730
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
Always use a timeout calling Poll::poll in tests #1230
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I understand the problem this patch is trying to fix, I think the patch has its own problems:
poll(None) vs poll(timeout) exercise different code paths. Removing all poll(None) from tests means its code paths are no longer tested.
Having an assert(Poll(timeout)) failing doesn't seem more data than knowing a Poll(None) hangs.
Maybe the CI can be configured to terminate a test earlier than 1 hour?
@dtacalau Brings up a good point about testing the |
I agree with @dtacalau and been looking into other solutions. I found the
See |
Oh you need to pass |
Or we could just use the |
@Thomasdezeeuw Unfortunately it doesn't look like there is a great alternative for that on Windows. It looks like it some kind of equivalent could be used if CI was setup to run through Powerhsell? |
Not doing it this way and I haven't found an alternative to |
Something the following could work in the future.
|
This is to prevent #1226 from happening too some extend, see the docs of
NO_TIMEOUT
intests/util/mod.rs
.