mirror of
https://github.com/fafhrd91/actix-web
synced 2025-01-29 18:22:35 +01:00
Make test_server
async
fn
This commit is contained in:
parent
b93e1555ec
commit
a9a475d555
@ -4,6 +4,7 @@
|
||||
|
||||
* Update the `time` dependency to 0.2.7
|
||||
* Update `actix-connect` dependency to 2.0.0-alpha.2
|
||||
* Make `test_server` `async` fn.
|
||||
|
||||
## [1.0.0] - 2019-12-13
|
||||
|
||||
|
@ -43,7 +43,7 @@ pub use actix_testing::*;
|
||||
/// assert!(response.status().is_success());
|
||||
/// }
|
||||
/// ```
|
||||
pub fn test_server<F: ServiceFactory<TcpStream>>(factory: F) -> TestServer {
|
||||
pub async fn test_server<F: ServiceFactory<TcpStream>>(factory: F) -> TestServer {
|
||||
let (tx, rx) = mpsc::channel();
|
||||
|
||||
// run server in separate thread
|
||||
@ -92,7 +92,7 @@ pub fn test_server<F: ServiceFactory<TcpStream>>(factory: F) -> TestServer {
|
||||
|
||||
Client::build().connector(connector).finish()
|
||||
};
|
||||
actix_connect::start_default_resolver();
|
||||
actix_connect::start_default_resolver().await.unwrap();
|
||||
|
||||
TestServer {
|
||||
addr,
|
||||
|
Loading…
x
Reference in New Issue
Block a user