File tree 2 files changed +10
-6
lines changed
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"
27
27
name: Run configuration app (expecting a fail)
28
28
env:
29
29
DAPR_GRPC_PORT: "3500"
30
- DAPR_API_MAX_RETRIES: "10 "
30
+ DAPR_API_MAX_RETRIES: "1 "
31
31
DAPR_API_TIMEOUT_MILLISECONDS: "10000"
32
32
output_match_mode: substring
33
33
expected_stdout_lines:
34
34
- ''
35
35
expected_stderr_lines:
36
- - 'TransportError '
36
+ - 'ConnectError '
37
37
expected_return_code: 101
38
38
background: false
39
39
sleep: 30
58
58
DAPR_API_TIMEOUT_MILLISECONDS: "10000"
59
59
output_match_mode: substring
60
60
expected_stdout_lines:
61
- - '== APP == Configuration value: ConfigurationItem { value: "world"'
61
+ - 'Configuration value: ConfigurationItem { value: "world"'
62
62
background: true
63
63
sleep: 30
64
64
timeout_seconds: 30
@@ -80,8 +80,8 @@ output_match_mode: substring
80
80
expected_stdout_lines:
81
81
- ''
82
82
background: true
83
- sleep: 10
84
- timeout_seconds: 10
83
+ sleep: 15
84
+ timeout_seconds: 15
85
85
-->
86
86
87
87
``` bash
Original file line number Diff line number Diff line change
1
+ use std:: time:: Instant ;
2
+
1
3
const CONFIGSTORE_NAME : & str = "configstore" ;
2
4
type DaprClient = dapr:: Client < dapr:: client:: TonicClient > ;
3
5
@@ -7,6 +9,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
7
9
let addr = "https://127.0.0.1" . to_string ( ) ;
8
10
9
11
// Create the client
12
+ let start_time = Instant :: now ( ) ;
10
13
let mut client = match DaprClient :: connect ( addr) . await {
11
14
Ok ( client) => {
12
15
println ! ( "connected to dapr sidecar" ) ;
@@ -16,7 +19,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
16
19
panic ! ( "failed to connect to dapr sidecar: {:?}" , error)
17
20
}
18
21
} ;
19
- println ! ( "debug" ) ;
22
+ let client_start_duration = start_time. elapsed ( ) ;
23
+ println ! ( "Client connection took: {:?}" , client_start_duration) ;
20
24
21
25
let key = String :: from ( "hello" ) ;
22
26
You can’t perform that action at this time.
0 commit comments