mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-24 07:53:00 +01:00
Disable signals in HttpServers started by the tests. (#69)
Something is wrong with signals on windows. This change causes the unit tests to pass on Windows.
This commit is contained in:
parent
bd03ba1192
commit
f8f99ec0c7
@ -87,7 +87,7 @@ impl TestServer {
|
|||||||
let local_addr = tcp.local_addr().unwrap();
|
let local_addr = tcp.local_addr().unwrap();
|
||||||
let tcp = TcpListener::from_listener(tcp, &local_addr, Arbiter::handle()).unwrap();
|
let tcp = TcpListener::from_listener(tcp, &local_addr, Arbiter::handle()).unwrap();
|
||||||
|
|
||||||
HttpServer::new(factory).start_incoming(tcp.incoming(), false);
|
HttpServer::new(factory).disable_signals().start_incoming(tcp.incoming(), false);
|
||||||
|
|
||||||
tx.send((Arbiter::system(), local_addr)).unwrap();
|
tx.send((Arbiter::system(), local_addr)).unwrap();
|
||||||
let _ = sys.run();
|
let _ = sys.run();
|
||||||
@ -124,7 +124,7 @@ impl TestServer {
|
|||||||
let mut app = TestApp::new(state());
|
let mut app = TestApp::new(state());
|
||||||
config(&mut app);
|
config(&mut app);
|
||||||
app}
|
app}
|
||||||
).start_incoming(tcp.incoming(), false);
|
).disable_signals().start_incoming(tcp.incoming(), false);
|
||||||
|
|
||||||
tx.send((Arbiter::system(), local_addr)).unwrap();
|
tx.send((Arbiter::system(), local_addr)).unwrap();
|
||||||
let _ = sys.run();
|
let _ = sys.run();
|
||||||
|
Loading…
Reference in New Issue
Block a user