mirror of
https://github.com/actix/actix-web.git
synced 2024-12-24 00:50:36 +00:00
flaky test
This commit is contained in:
parent
542315ce7f
commit
a4b837a1c1
1 changed files with 2 additions and 2 deletions
|
@ -78,7 +78,6 @@ fn test_start() {
|
||||||
let (addr, srv_addr) = rx.recv().unwrap();
|
let (addr, srv_addr) = rx.recv().unwrap();
|
||||||
|
|
||||||
let mut sys = System::new("test-server");
|
let mut sys = System::new("test-server");
|
||||||
|
|
||||||
{
|
{
|
||||||
let req = client::ClientRequest::get(format!("http://{}/", addr).as_str()).finish().unwrap();
|
let req = client::ClientRequest::get(format!("http://{}/", addr).as_str()).finish().unwrap();
|
||||||
let response = sys.run_until_complete(req.send()).unwrap();
|
let response = sys.run_until_complete(req.send()).unwrap();
|
||||||
|
@ -87,11 +86,12 @@ fn test_start() {
|
||||||
|
|
||||||
// pause
|
// pause
|
||||||
let _ = srv_addr.send(server::PauseServer).wait();
|
let _ = srv_addr.send(server::PauseServer).wait();
|
||||||
thread::sleep(time::Duration::from_millis(100));
|
thread::sleep(time::Duration::from_millis(200));
|
||||||
assert!(net::TcpStream::connect(addr).is_err());
|
assert!(net::TcpStream::connect(addr).is_err());
|
||||||
|
|
||||||
// resume
|
// resume
|
||||||
let _ = srv_addr.send(server::ResumeServer).wait();
|
let _ = srv_addr.send(server::ResumeServer).wait();
|
||||||
|
thread::sleep(time::Duration::from_millis(200));
|
||||||
|
|
||||||
{
|
{
|
||||||
let req = client::ClientRequest::get(format!("http://{}/", addr).as_str()).finish().unwrap();
|
let req = client::ClientRequest::get(format!("http://{}/", addr).as_str()).finish().unwrap();
|
||||||
|
|
Loading…
Reference in a new issue