Skip to content

Commit

Permalink
fix(quic): delete flaky dial_failure test
Browse files Browse the repository at this point in the history
This test is sometimes flaky. Instead of fixing it, I am proposing to delete it because it doesn't test anything meaningful. Dialing a non-existent transport should fail? Yes probably. Should we test that dropping a value destroys the relevant tasks? I don't think so. That is covered by Rust's ownership rules.

Pull-Request: #4640.
  • Loading branch information
thomaseizinger authored Oct 13, 2023
1 parent 50a7ffe commit 56cb08a
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions transports/quic/tests/smoke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,6 @@ async fn async_std_smoke() {
smoke::<quic::async_std::Provider>().await
}

#[cfg(feature = "async-std")]
#[async_std::test]
async fn dial_failure() {
let _ = env_logger::try_init();
let mut a = create_default_transport::<quic::async_std::Provider>().1;
let mut b = create_default_transport::<quic::async_std::Provider>().1;

let addr = start_listening(&mut a, "/ip4/127.0.0.1/udp/0/quic-v1").await;
drop(a); // stop a so b can never reach it

match dial(&mut b, addr).await {
Ok(_) => panic!("Expected dial to fail"),
Err(error) => {
assert_eq!("Handshake with the remote timed out.", error.to_string())
}
};
}

#[cfg(feature = "tokio")]
#[tokio::test]
async fn endpoint_reuse() {
Expand Down

0 comments on commit 56cb08a

Please sign in to comment.