-
Notifications
You must be signed in to change notification settings - Fork 46
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
Refactor tests #145
Refactor tests #145
Conversation
This ensures we are only accessing the public API of the crate.
This is a more flexible API.
This makes for a cleaner call-site.
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.
Thanks.
Am I correct assuming that you moved to tests/
to make sure we test the external API of the crate @thomaseizinger?
One comment, otherwise looks good to me.
@@ -56,7 +56,7 @@ fn prop_config_send_recv_single() { | |||
.expect("send_recv") | |||
}; | |||
|
|||
let result = futures::join!(server, client).1; | |||
let result = futures::future::join(server, client).await.1; |
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.
🙏
@@ -131,16 +131,19 @@ impl Stream { | |||
self.id | |||
} | |||
|
|||
pub fn is_write_closed(&self) -> bool { |
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.
Is this a breaking change? If so, this would require a changelog entry.
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.
Adding a new function is not a breaking change I believe!
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.
Silly me. Sorry for the noise.
Yes! |
@@ -131,16 +131,19 @@ impl Stream { | |||
self.id | |||
} | |||
|
|||
pub fn is_write_closed(&self) -> bool { |
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.
Silly me. Sorry for the noise.
As part of #142, I had a look at the tests and I found them rather hard to understand.
This PR attempts to improve this situation. It is a clean refactoring, no behaviour has been changed and should thus hopefully be non-controversial.