-
Notifications
You must be signed in to change notification settings - Fork 43
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
Use tokio in tests. #83
Conversation
Out of curiosity, could you expand on the motivation for this patch? |
Like in libp2p/rust-libp2p#1588, tests do not complete with async-std > 1.5.0. |
@@ -232,7 +232,7 @@ mod tests { | |||
#[test] | |||
fn encode_decode_identity() { | |||
fn property(f: Frame<()>) -> bool { | |||
async_std::task::block_on(async move { | |||
futures::executor::block_on(async move { |
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.
Why use futures::executor
here and Runtime::block_on
in other places?
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.
The correctness does not depend on the runtime choice so it does not really matter. As this is a small property test without concurrency, executing it on the same thread is more light-weight.
NB: CI is failing with nightly because of rust-lang/cargo#8351:
|
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.
For what my review is worth, this looks good to me.
No description provided.