Skip to content

Commit

Permalink
Fix the mio test again (openethereum#8602)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaka authored and VladLupashevskyi committed May 23, 2018
1 parent ce5525f commit b9b4fd9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion util/io/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,12 @@ mod tests {
use std::time::Duration;
use super::*;

// Mio's behaviour is too unstable for this test. Sometimes we have to wait a few milliseconds,
// sometimes more than 5 seconds for the message to arrive.
// Therefore we ignore this test in order to not have spurious failure when running continuous
// integration.
#[test]
#[cfg_attr(feature = "mio", ignore)]
fn send_message_to_handler() {
struct MyHandler(atomic::AtomicBool);

Expand All @@ -209,7 +214,7 @@ mod tests {

service.send_message(MyMessage { data: 5 }).unwrap();

thread::sleep(Duration::from_secs(5));
thread::sleep(Duration::from_secs(1));
assert!(handler.0.load(atomic::Ordering::SeqCst));
}

Expand Down

0 comments on commit b9b4fd9

Please sign in to comment.