Skip to content

Commit

Permalink
net: fix the uds_datagram tests with the latest nightly stdlib (#3952)
Browse files Browse the repository at this point in the history
  • Loading branch information
asomers committed Jul 12, 2021
1 parent ccd4956 commit 3fd88da
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions tokio/tests/uds_datagram.rs
Expand Up @@ -87,9 +87,12 @@ async fn try_send_recv_never_block() -> io::Result<()> {
dgram1.writable().await.unwrap();

match dgram1.try_send(payload) {
Err(err) => match err.kind() {
io::ErrorKind::WouldBlock | io::ErrorKind::Other => break,
_ => unreachable!("unexpected error {:?}", err),
Err(err) => match (err.kind(), err.raw_os_error()) {
(io::ErrorKind::WouldBlock, _) => break,
(_, Some(libc::ENOBUFS)) => break,
_ => {
panic!("unexpected error {:?}", err);
}
},
Ok(len) => {
assert_eq!(len, payload.len());
Expand Down Expand Up @@ -291,9 +294,12 @@ async fn try_recv_buf_never_block() -> io::Result<()> {
dgram1.writable().await.unwrap();

match dgram1.try_send(payload) {
Err(err) => match err.kind() {
io::ErrorKind::WouldBlock | io::ErrorKind::Other => break,
_ => unreachable!("unexpected error {:?}", err),
Err(err) => match (err.kind(), err.raw_os_error()) {
(io::ErrorKind::WouldBlock, _) => break,
(_, Some(libc::ENOBUFS)) => break,
_ => {
panic!("unexpected error {:?}", err);
}
},
Ok(len) => {
assert_eq!(len, payload.len());
Expand Down

2 comments on commit 3fd88da

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'sync_mpsc'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 3fd88da Previous: ccd4956 Ratio
send_large 59486 ns/iter (± 9370) 24637 ns/iter (± 309) 2.41

This comment was automatically generated by workflow using github-action-benchmark.

CC: @tokio-rs/maintainers

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'sync_mpsc'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 3fd88da Previous: ccd4956 Ratio
send_large 61690 ns/iter (± 5408) 24637 ns/iter (± 309) 2.50

This comment was automatically generated by workflow using github-action-benchmark.

CC: @tokio-rs/maintainers

Please sign in to comment.