force shutdown both test server types

This commit is contained in:
Rob Ede 2021-11-18 17:20:14 +00:00
parent a71627e61e
commit 87023d0783
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
2 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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