1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-12-18 04:33:12 +01:00

add delay to test

This commit is contained in:
Nikolay Kim 2019-03-11 12:35:57 -07:00
parent 787255d030
commit 9887aef6e8

View File

@ -102,6 +102,7 @@ fn test_start() {
let _ = srv.pause(); let _ = srv.pause();
thread::sleep(time::Duration::from_millis(100)); thread::sleep(time::Duration::from_millis(100));
assert!(net::TcpStream::connect_timeout(&addr, time::Duration::from_millis(100)).is_ok()); assert!(net::TcpStream::connect_timeout(&addr, time::Duration::from_millis(100)).is_ok());
thread::sleep(time::Duration::from_millis(100));
assert!(net::TcpStream::connect_timeout(&addr, time::Duration::from_millis(100)).is_err()); assert!(net::TcpStream::connect_timeout(&addr, time::Duration::from_millis(100)).is_err());
// resume // resume