From c511c651403020f7988b0d2471a945df3fd5ad26 Mon Sep 17 00:00:00 2001 From: neonphog Date: Wed, 16 Oct 2024 10:41:24 -0600 Subject: [PATCH] test fix --- crates/tx5/src/test.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/tx5/src/test.rs b/crates/tx5/src/test.rs index d45e5bb..9eacc3c 100644 --- a/crates/tx5/src/test.rs +++ b/crates/tx5/src/test.rs @@ -1,5 +1,7 @@ use crate::*; +const DISCONNECT: &[u8] = b"<<>>"; + struct TestEp { ep: Endpoint, task: tokio::task::JoinHandle<()>, @@ -48,7 +50,7 @@ impl TestEp { } EndpointEvent::Disconnected { peer_url } => { if send - .send((peer_url, b"<<>>".to_vec())) + .send((peer_url, DISCONNECT.to_vec())) .is_err() { break; @@ -469,6 +471,10 @@ async fn ep_messages_contiguous() { loop { let (peer_url, message) = dest_recv.recv().await.unwrap(); + if message == DISCONNECT { + continue; + } + assert_eq!(((16 * 1024) - 4) * CHUNK_COUNT, message.len()); for chunk_id in 0..CHUNK_COUNT {