Skip to content

Commit

Permalink
Fix some flaky tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Oct 9, 2023
1 parent 116673f commit 1d0fc19
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fn test_sample_application(family: IpAddressFamily, bind_address: IpSocketAddres
}

{
let (_accepted, input, _output) = listener.accept().unwrap();
let (_accepted, input, _output) = listener.blocking_accept().unwrap();

let empty_data = input.read(0).unwrap();
assert!(empty_data.is_empty());
Expand Down
4 changes: 2 additions & 2 deletions crates/test-programs/src/bin/preview2_tcp_sockopts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ fn test_tcp_sockopt_inheritance(net: &Network, family: IpAddressFamily) {
let bound_addr = listener.local_address().unwrap();
let client = TcpSocket::new(family).unwrap();
client.blocking_connect(&net, bound_addr).unwrap();
let (accepted_client, _, _) = listener.accept().unwrap();
let (accepted_client, _, _) = listener.blocking_accept().unwrap();

// Verify options on accepted socket:
{
Expand Down Expand Up @@ -158,7 +158,7 @@ fn test_tcp_sockopt_after_listen(net: &Network, family: IpAddressFamily) {

let client = TcpSocket::new(family).unwrap();
client.blocking_connect(&net, bound_addr).unwrap();
let (accepted_client, _, _) = listener.accept().unwrap();
let (accepted_client, _, _) = listener.blocking_accept().unwrap();

// Verify options on accepted socket:
{
Expand Down

0 comments on commit 1d0fc19

Please sign in to comment.