From 11e7b1f92277c41cf176ec3774348f570ee060b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=A4rtens?= Date: Mon, 29 Jun 2020 14:29:38 +0200 Subject: [PATCH] increase network sleep in order to fix flanky tests --- network/tests/closing.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/network/tests/closing.rs b/network/tests/closing.rs index bed4d3de68..90667c20ff 100644 --- a/network/tests/closing.rs +++ b/network/tests/closing.rs @@ -9,7 +9,7 @@ fn close_network() { let (_, _) = helper::setup(false, 0); let (_, _p1_a, mut s1_a, _, _p1_b, mut s1_b) = block_on(network_participant_stream(tcp())); - std::thread::sleep(std::time::Duration::from_millis(200)); + std::thread::sleep(std::time::Duration::from_millis(400)); assert_eq!(s1_a.send("Hello World"), Err(StreamError::StreamClosed)); let msg1: Result = block_on(s1_b.recv()); @@ -37,7 +37,7 @@ fn close_stream() { let (_n_a, _, mut s1_a, _n_b, _, _) = block_on(network_participant_stream(tcp())); // s1_b is dropped directly while s1_a isn't - std::thread::sleep(std::time::Duration::from_millis(200)); + std::thread::sleep(std::time::Duration::from_millis(400)); assert_eq!(s1_a.send("Hello World"), Err(StreamError::StreamClosed)); assert_eq!( @@ -75,7 +75,7 @@ fn stream_simple_3msg_then_close() { assert_eq!(block_on(s1_b.recv()), Ok(42)); assert_eq!(block_on(s1_b.recv()), Ok("3rdMessage".to_string())); drop(s1_a); - std::thread::sleep(std::time::Duration::from_millis(200)); + std::thread::sleep(std::time::Duration::from_millis(400)); assert_eq!(s1_b.send("Hello World"), Err(StreamError::StreamClosed)); } @@ -147,7 +147,7 @@ fn stream_send_100000_then_close_stream_remote2() { s1_a.send("woop_PARTY_HARD_woop").unwrap(); } drop(_s1_b); - std::thread::sleep(std::time::Duration::from_millis(200)); + std::thread::sleep(std::time::Duration::from_millis(400)); drop(s1_a); //no receiving } @@ -160,7 +160,7 @@ fn stream_send_100000_then_close_stream_remote3() { s1_a.send("woop_PARTY_HARD_woop").unwrap(); } drop(_s1_b); - std::thread::sleep(std::time::Duration::from_millis(200)); + std::thread::sleep(std::time::Duration::from_millis(400)); drop(s1_a); //no receiving }