From 02b37570f472c55b1b04c705712c9612a63b938d Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Thu, 28 Dec 2017 09:11:25 -0800 Subject: [PATCH] flaky test --- tests/test_server.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_server.rs b/tests/test_server.rs index cfea669ba..0852affbd 100644 --- a/tests/test_server.rs +++ b/tests/test_server.rs @@ -4,7 +4,7 @@ extern crate tokio_core; extern crate reqwest; extern crate futures; -use std::{net, thread}; +use std::{net, thread, time}; use std::sync::{Arc, mpsc}; use std::sync::atomic::{AtomicUsize, Ordering}; use futures::Future; @@ -34,6 +34,7 @@ fn test_start() { // pause let _ = srv_addr.call_fut(dev::PauseServer).wait(); + thread::sleep(time::Duration::from_millis(100)); assert!(net::TcpStream::connect(addr).is_err()); // resume