Skip to content

Commit a0b506d

Browse files
committed
chore: remove sleep steps
Signed-off-by: mikeee <[email protected]>
1 parent 0beb668 commit a0b506d

File tree

7 files changed

+0
-23
lines changed

7 files changed

+0
-23
lines changed

examples/actors/client.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ pub struct MyRequest {
1212

1313
#[tokio::main]
1414
async fn main() -> Result<(), Box<dyn std::error::Error>> {
15-
// TODO: Handle this issue in the sdk
16-
// Introduce delay so that dapr grpc port is assigned before app tries to connect
17-
std::thread::sleep(std::time::Duration::new(2, 0));
18-
1915
// Define the Dapr address
2016
let addr = "https://127.0.0.1".to_string();
2117

examples/client/client.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#[tokio::main]
22
async fn main() -> Result<(), Box<dyn std::error::Error>> {
3-
// TODO: Handle this issue in the sdk
4-
// Introduce delay so that dapr grpc port is assigned before app tries to connect
5-
std::thread::sleep(std::time::Duration::new(2, 0));
6-
73
// Set the Dapr address
84
let addr = "https://127.0.0.1".to_string();
95

examples/configuration/main.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ type DaprClient = dapr::Client<dapr::client::TonicClient>;
55

66
#[tokio::main]
77
async fn main() -> Result<(), Box<dyn std::error::Error>> {
8-
// TODO: Handle this issue in the sdk
9-
// Introduce delay so that dapr grpc port is assigned before app tries to connect
10-
std::thread::sleep(std::time::Duration::new(2, 0));
11-
128
// Set the Dapr address
139
let addr = "https://127.0.0.1".to_string();
1410

examples/crypto/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use dapr::client::ReaderStream;
77

88
#[tokio::main]
99
async fn main() -> Result<(), Box<dyn std::error::Error>> {
10-
sleep(std::time::Duration::new(2, 0)).await;
1110
let addr = "https://127.0.0.1".to_string();
1211

1312
let mut client = dapr::Client::<dapr::client::TonicClient>::connect(addr).await?;

examples/invoke/grpc-proxying/client.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ pub mod hello_world {
1010

1111
#[tokio::main]
1212
async fn main() -> Result<(), Box<dyn std::error::Error>> {
13-
// Sleep to allow for the server to become available
14-
thread::sleep(Duration::from_secs(5));
15-
1613
// Get the Dapr port and create a connection
1714
let port: u16 = std::env::var("DAPR_GRPC_PORT").unwrap().parse().unwrap();
1815
let address = format!("https://127.0.0.1:{}", port);

examples/invoke/grpc/client.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ type DaprClient = dapr::Client<dapr::client::TonicClient>;
1111

1212
#[tokio::main]
1313
async fn main() -> Result<(), Box<dyn std::error::Error>> {
14-
// Sleep to allow for the server to become available
15-
thread::sleep(Duration::from_secs(5));
16-
1714
// Set the Dapr address
1815
let address = "https://127.0.0.1".to_string();
1916

examples/pubsub/publisher.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ struct Refund {
1717

1818
#[tokio::main]
1919
async fn main() -> Result<(), Box<dyn std::error::Error>> {
20-
// TODO: Handle this issue in the sdk
21-
// Introduce delay so that dapr grpc port is assigned before app tries to connect
22-
thread::sleep(Duration::from_secs(2));
23-
2420
// Set address for Dapr connection
2521
let addr = "https://127.0.0.1".to_string();
2622

0 commit comments

Comments
 (0)