File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -27,13 +27,13 @@ docker exec dapr_redis redis-cli MSET hello "world"
2727name: Run configuration app (expecting a fail)
2828env:
2929 DAPR_GRPC_PORT: "3500"
30- DAPR_API_MAX_RETRIES: "10 "
30+ DAPR_API_MAX_RETRIES: "1 "
3131 DAPR_API_TIMEOUT_MILLISECONDS: "10000"
3232output_match_mode: substring
3333expected_stdout_lines:
3434 - ''
3535expected_stderr_lines:
36- - 'TransportError '
36+ - 'ConnectError '
3737expected_return_code: 101
3838background: false
3939sleep: 30
5858 DAPR_API_TIMEOUT_MILLISECONDS: "10000"
5959output_match_mode: substring
6060expected_stdout_lines:
61- - '== APP == Configuration value: ConfigurationItem { value: "world"'
61+ - 'Configuration value: ConfigurationItem { value: "world"'
6262background: true
6363sleep: 30
6464timeout_seconds: 30
@@ -80,8 +80,8 @@ output_match_mode: substring
8080expected_stdout_lines:
8181 - ''
8282background: true
83- sleep: 10
84- timeout_seconds: 10
83+ sleep: 15
84+ timeout_seconds: 15
8585-->
8686
8787``` bash
Original file line number Diff line number Diff line change 1+ use std:: time:: Instant ;
2+
13const CONFIGSTORE_NAME : & str = "configstore" ;
24type DaprClient = dapr:: Client < dapr:: client:: TonicClient > ;
35
@@ -7,6 +9,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
79 let addr = "https://127.0.0.1" . to_string ( ) ;
810
911 // Create the client
12+ let start_time = Instant :: now ( ) ;
1013 let mut client = match DaprClient :: connect ( addr) . await {
1114 Ok ( client) => {
1215 println ! ( "connected to dapr sidecar" ) ;
@@ -16,7 +19,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
1619 panic ! ( "failed to connect to dapr sidecar: {:?}" , error)
1720 }
1821 } ;
19- println ! ( "debug" ) ;
22+ let client_start_duration = start_time. elapsed ( ) ;
23+ println ! ( "Client connection took: {:?}" , client_start_duration) ;
2024
2125 let key = String :: from ( "hello" ) ;
2226
You can’t perform that action at this time.
0 commit comments