Upgrade to Tokio 1.0.0 ecosystem (#530)

* Upgrade Tonic to Tokio 1.0

Work in progress for updating Tonic to Tokio 1.0. Since tower has not
been released to crates.io, a git dependency is taken instead.

* Upgrade Tonic to Tokio 1.0 phase 2

* tonic: remove tower-* deps

* Apply suggestions from code review

Co-authored-by: Ed Marshall <[email protected]>
Co-authored-by: Lucio Franco <[email protected]>
This commit is contained in:
Quentin Perez
2021-01-11 12:18:34 -05:00
committed by GitHub
co-authored by Ed Marshall Lucio Franco
parent fe4d5b9d9a
commit fdda5ae26a
42 changed files with 185 additions and 185 deletions
+4 -4
View File
@@ -41,14 +41,14 @@ async fn connect_returns_err_via_call_after_connected() {
.unwrap();
});
tokio::time::delay_for(Duration::from_millis(100)).await;
tokio::time::sleep(Duration::from_millis(100)).await;
let mut client = TestClient::connect("http://127.0.0.1:1338").await.unwrap();
// First call should pass, then shutdown the server
client.unary_call(Request::new(Input {})).await.unwrap();
tokio::time::delay_for(Duration::from_millis(100)).await;
tokio::time::sleep(Duration::from_millis(100)).await;
let res = client.unary_call(Request::new(Input {})).await;
@@ -81,11 +81,11 @@ async fn connect_lazy_reconnects_after_first_failure() {
.unwrap();
});
tokio::time::delay_for(Duration::from_millis(100)).await;
tokio::time::sleep(Duration::from_millis(100)).await;
client.unary_call(Request::new(Input {})).await.unwrap();
// The server shut down, third call should fail
tokio::time::delay_for(Duration::from_millis(100)).await;
tokio::time::sleep(Duration::from_millis(100)).await;
client.unary_call(Request::new(Input {})).await.unwrap_err();
jh.await.unwrap();
+2 -2
View File
@@ -33,7 +33,7 @@ async fn status_with_details() {
.unwrap();
});
tokio::time::delay_for(Duration::from_millis(100)).await;
tokio::time::sleep(Duration::from_millis(100)).await;
let mut channel = test_client::TestClient::connect("http://127.0.0.1:1337")
.await
@@ -87,7 +87,7 @@ async fn status_with_metadata() {
.unwrap();
});
tokio::time::delay_for(Duration::from_millis(100)).await;
tokio::time::sleep(Duration::from_millis(100)).await;
let mut channel = test_client::TestClient::connect("http://127.0.0.1:1338")
.await
+1 -1
View File
@@ -33,7 +33,7 @@ async fn writes_user_agent_header() {
.unwrap();
});
tokio::time::delay_for(Duration::from_millis(100)).await;
tokio::time::sleep(Duration::from_millis(100)).await;
let channel = Endpoint::from_static("http://127.0.0.1:1322")
.user_agent("my-client")