diff --git a/awc/Cargo.toml b/awc/Cargo.toml index e085ea09d..4d5fde549 100644 --- a/awc/Cargo.toml +++ b/awc/Cargo.toml @@ -63,6 +63,7 @@ rust-tls = { version = "0.16.0", package="rustls", optional = true, features = [ [dev-dependencies] actix-rt = "1.0.0-alpha.1" +actix-connect = { version = "1.0.0-alpha.1", features=["openssl"] } actix-web = { version = "2.0.0-alpha.1", features=["openssl"] } actix-http = { version = "0.3.0-alpha.1", features=["openssl"] } actix-http-test = { version = "0.3.0-alpha.1", features=["openssl"] } diff --git a/awc/tests/test_client.rs b/awc/tests/test_client.rs index bcedaf64b..959380306 100644 --- a/awc/tests/test_client.rs +++ b/awc/tests/test_client.rs @@ -125,9 +125,18 @@ fn test_timeout() { ))) }); + let connector = awc::Connector::new() + .connector(actix_connect::new_connector( + actix_connect::start_default_resolver(), + )) + .timeout(Duration::from_secs(15)) + .finish(); + let client = awc::Client::build() + .connector(connector) .timeout(Duration::from_millis(50)) .finish(); + let request = client.get(srv.url("/")).send(); match request.await { Err(SendRequestError::Timeout) => (),