1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 22:49:21 +02:00

update tests

This commit is contained in:
Nikolay Kim
2019-03-26 12:31:51 -07:00
parent c7ad677804
commit 50c0ddb3cd
7 changed files with 36 additions and 45 deletions

View File

@ -48,23 +48,21 @@ fn test_start() {
});
let (srv, sys) = rx.recv().unwrap();
let mut connector = test::run_on(|| {
let client = test::run_on(|| {
Ok::<_, ()>(
client::Connector::new()
.timeout(Duration::from_millis(100))
.service(),
awc::Client::build()
.connector(
client::Connector::new()
.timeout(Duration::from_millis(100))
.service(),
)
.finish(),
)
})
.unwrap();
let host = format!("http://{}", addr);
let response = test::block_on(
client::ClientRequest::get(host.clone())
.finish()
.unwrap()
.send(&mut connector),
)
.unwrap();
let response = test::block_on(client.get(host.clone()).send()).unwrap();
assert!(response.status().is_success());
// stop