chore(dependencies): update tokio, h2, and tower-make

This commit is contained in:
Taiki Endo
2019-09-24 03:35:21 +09:00
committed by Sean McArthur
parent dc54ee199f
commit 053d6497bd
5 changed files with 33 additions and 33 deletions

View File

@@ -974,7 +974,7 @@ mod dispatch_impl {
.unwrap();
let res = client.request(req).map_ok(move |res| {
assert_eq!(res.status(), hyper::StatusCode::OK);
tokio_timer::sleep(Duration::from_secs(1))
tokio_timer::delay_for(Duration::from_secs(1))
});
let rx = rx1.expect("thread panicked");
rt.block_on(future::join(res, rx).map(|r| r.0)).unwrap();
@@ -1018,7 +1018,7 @@ mod dispatch_impl {
assert_eq!(res.status(), hyper::StatusCode::OK);
res.into_body().try_concat()
}).map_ok(|_| {
tokio_timer::sleep(Duration::from_secs(1))
tokio_timer::delay_for(Duration::from_secs(1))
})
};
// client is dropped
@@ -1082,7 +1082,7 @@ mod dispatch_impl {
}
drop(client);
let t = tokio_timer::sleep(Duration::from_millis(100))
let t = tokio_timer::delay_for(Duration::from_millis(100))
.map(|_| panic!("time out"));
let close = closes
.into_future()
@@ -1131,7 +1131,7 @@ mod dispatch_impl {
rt.block_on(future::select(res, rx1));
// res now dropped
let t = tokio_timer::sleep(Duration::from_millis(100))
let t = tokio_timer::delay_for(Duration::from_millis(100))
.map(|_| panic!("time out"));
let close = closes
.into_future()
@@ -1180,7 +1180,7 @@ mod dispatch_impl {
let rx = rx1.expect("thread panicked");
rt.block_on(future::join(res, rx).map(|r| r.0)).unwrap();
let t = tokio_timer::sleep(Duration::from_millis(100))
let t = tokio_timer::delay_for(Duration::from_millis(100))
.map(|_| panic!("time out"));
let close = closes
.into_future()
@@ -1230,7 +1230,7 @@ mod dispatch_impl {
let rx = rx1.expect("thread panicked");
rt.block_on(future::join(res, rx).map(|r| r.0)).unwrap();
let t = tokio_timer::sleep(Duration::from_millis(100))
let t = tokio_timer::delay_for(Duration::from_millis(100))
.map(|_| panic!("time out"));
let close = closes
.into_future()
@@ -1274,7 +1274,7 @@ mod dispatch_impl {
let rx = rx1.expect("thread panicked");
rt.block_on(future::join(res, rx).map(|r| r.0)).unwrap();
let t = tokio_timer::sleep(Duration::from_millis(100))
let t = tokio_timer::delay_for(Duration::from_millis(100))
.map(|_| panic!("time out"));
let close = closes
.into_future()
@@ -1469,7 +1469,7 @@ mod dispatch_impl {
assert_eq!(connects.load(Ordering::Relaxed), 0);
let delayed_body = rx1
.then(|_| tokio_timer::sleep(Duration::from_millis(200)))
.then(|_| tokio_timer::delay_for(Duration::from_millis(200)))
.map(|_| Ok::<_, ()>("hello a"))
.map_err(|_| -> hyper::Error { panic!("rx1") })
.into_stream();
@@ -1484,7 +1484,7 @@ mod dispatch_impl {
// req 1
let fut = future::join(client.request(req), rx)
.then(|_| tokio_timer::sleep(Duration::from_millis(200)))
.then(|_| tokio_timer::delay_for(Duration::from_millis(200)))
// req 2
.then(move |()| {
let rx = rx3.expect("thread panicked");
@@ -1838,7 +1838,7 @@ mod conn {
res.into_body().try_concat()
});
let rx = rx1.expect("thread panicked");
let rx = rx.then(|_| tokio_timer::sleep(Duration::from_millis(200)));
let rx = rx.then(|_| tokio_timer::delay_for(Duration::from_millis(200)));
rt.block_on(future::join(res, rx).map(|r| r.0)).unwrap();
}
@@ -1884,7 +1884,7 @@ mod conn {
});
let rx = rx1.expect("thread panicked");
let rx = rx.then(|_| tokio_timer::sleep(Duration::from_millis(200)));
let rx = rx.then(|_| tokio_timer::delay_for(Duration::from_millis(200)));
let chunk = rt.block_on(future::join(res, rx).map(|r| r.0)).unwrap();
assert_eq!(chunk.len(), 5);
}
@@ -1976,7 +1976,7 @@ mod conn {
res.into_body().try_concat()
});
let rx = rx1.expect("thread panicked");
let rx = rx.then(|_| tokio_timer::sleep(Duration::from_millis(200)));
let rx = rx.then(|_| tokio_timer::delay_for(Duration::from_millis(200)));
rt.block_on(future::join(res, rx).map(|r| r.0)).unwrap();
}
@@ -2020,7 +2020,7 @@ mod conn {
res.into_body().try_concat()
});
let rx = rx1.expect("thread panicked");
let rx = rx.then(|_| tokio_timer::sleep(Duration::from_millis(200)));
let rx = rx.then(|_| tokio_timer::delay_for(Duration::from_millis(200)));
rt.block_on(future::join(res, rx).map(|r| r.0)).unwrap();
}
@@ -2072,7 +2072,7 @@ mod conn {
});
let rx = rx1.expect("thread panicked");
let rx = rx.then(|_| tokio_timer::sleep(Duration::from_millis(200)));
let rx = rx.then(|_| tokio_timer::delay_for(Duration::from_millis(200)));
rt.block_on(future::join3(res1, res2, rx).map(|r| r.0)).unwrap();
}
@@ -2132,7 +2132,7 @@ mod conn {
});
let rx = rx1.expect("thread panicked");
let rx = rx.then(|_| tokio_timer::sleep(Duration::from_millis(200)));
let rx = rx.then(|_| tokio_timer::delay_for(Duration::from_millis(200)));
rt.block_on(future::join3(until_upgrade, res, rx).map(|r| r.0)).unwrap();
// should not be ready now
@@ -2220,7 +2220,7 @@ mod conn {
});
let rx = rx1.expect("thread panicked");
let rx = rx.then(|_| tokio_timer::sleep(Duration::from_millis(200)));
let rx = rx.then(|_| tokio_timer::delay_for(Duration::from_millis(200)));
rt.block_on(future::join3(until_tunneled, res, rx).map(|r| r.0)).unwrap();
// should not be ready now
@@ -2296,7 +2296,7 @@ mod conn {
let _ = shdn_tx.send(());
// Allow time for graceful shutdown roundtrips...
rt.block_on(tokio_timer::sleep(Duration::from_millis(100)));
rt.block_on(tokio_timer::delay_for(Duration::from_millis(100)));
// After graceful shutdown roundtrips, the client should be closed...
rt.block_on(future::poll_fn(|ctx| client.poll_ready(ctx))).expect_err("client should be closed");