From 0b9e3d381b4e1a95a1e4d77732b1ae0d56903aa6 Mon Sep 17 00:00:00 2001
From: Nikolay Kim <fafhrd91@gmail.com>
Date: Thu, 21 Nov 2019 17:36:18 +0600
Subject: [PATCH] add test with custom connector

---
 awc/Cargo.toml           | 1 +
 awc/tests/test_client.rs | 9 +++++++++
 2 files changed, 10 insertions(+)

diff --git a/awc/Cargo.toml b/awc/Cargo.toml
index e085ea09..4d5fde54 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 bcedaf64..95938030 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) => (),