mirror of https://github.com/fafhrd91/actix-web
force shutdown both test server types
This commit is contained in:
parent
a71627e61e
commit
87023d0783
|
@ -275,7 +275,7 @@ impl TestServer {
|
|||
|
||||
/// Stop HTTP server.
|
||||
///
|
||||
/// Waits for spawned `Server` and `System` to force shutdown.
|
||||
/// Waits for spawned `Server` and `System` to (force) shutdown.
|
||||
pub async fn stop(&mut self) {
|
||||
// signal server to stop
|
||||
self.server.stop(false).await;
|
||||
|
|
|
@ -520,12 +520,12 @@ impl TestServer {
|
|||
self.client.headers()
|
||||
}
|
||||
|
||||
/// Gracefully stop HTTP server.
|
||||
/// Stop HTTP server.
|
||||
///
|
||||
/// Waits for spawned `Server` and `System` to shutdown gracefully.
|
||||
/// Waits for spawned `Server` and `System` to shutdown (force) shutdown.
|
||||
pub async fn stop(mut self) {
|
||||
// signal server to stop
|
||||
self.server.stop(true).await;
|
||||
self.server.stop(false).await;
|
||||
|
||||
// also signal system to stop
|
||||
// though this is handled by `ServerBuilder::exit_system` too
|
||||
|
|
Loading…
Reference in New Issue