Skip to content

Commit

Permalink
chore: remove dapr stop steps and add appropriate timeouts (#573)
Browse files Browse the repository at this point in the history
Signed-off-by: mikeee <[email protected]>
  • Loading branch information
mikeee authored Jul 22, 2024
1 parent 4a9f180 commit 7c03c7c
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 38 deletions.
13 changes: 3 additions & 10 deletions examples/actor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ expected_stdout_lines:
- '== APP == receive reminder = testReminderName state = "hello" duetime = 5s period = 5s'
background: true
sleep: 30
timeout_seconds: 60
-->

```bash
Expand Down Expand Up @@ -54,6 +55,7 @@ expected_stdout_lines:
background: true
sleep: 40
timeout_seconds: 60
-->

```bash
Expand All @@ -67,20 +69,11 @@ dapr run --app-id actor-client \

### Cleanup

<!-- STEP
expected_stdout_lines:
- '✅ app stopped successfully: actor-serving'
expected_stderr_lines:
name: Shutdown dapr
-->

```bash
dapr stop --app-id actor-serving
(lsof -i:8080 | grep main) | awk '{print $2}' | xargs kill
```

<!-- END_STEP -->

## Result
- client side
```
Expand Down Expand Up @@ -108,4 +101,4 @@ dapr stop --app-id actor-serving
== APP == get req = hello
== APP == receive reminder = testReminderName state = "hello" duetime = 5s period = 5s
== APP == receive reminder = testReminderName state = "hello" duetime = 5s period = 5s
```
```
1 change: 1 addition & 0 deletions examples/configuration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ expected_stdout_lines:
- '== APP == dapr configuration subscribe finished.'
background: false
sleep: 40
timeout_seconds: 60
-->

```bash
Expand Down
11 changes: 2 additions & 9 deletions examples/grpc-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ expected_stdout_lines:
- 'Received: Dapr'
background: true
sleep: 30
timeout_seconds: 60
-->

```bash
Expand All @@ -39,6 +40,7 @@ expected_stdout_lines:
output_match_mode: substring
background: true
sleep: 15
timeout_seconds: 60
-->

```bash
Expand All @@ -50,15 +52,6 @@ dapr run --app-id grpc-client \

### Cleanup

<!-- STEP
expected_stdout_lines:
- '✅ app stopped successfully: grpc-server'
expected_stderr_lines:
name: Shutdown dapr
-->

```bash
dapr stop --app-id grpc-server
```

<!-- END_STEP -->
2 changes: 2 additions & 0 deletions examples/hello-world/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ There are two ways to launch Dapr applications. You can pass the app executable
name: Run and send order
background: true
sleep: 5
timeout_seconds: 60
expected_stdout_lines:
- '== APP == dapr client initializing for: 127.0.0.1:3500'
- '== APP == Sending order ID 20'
Expand All @@ -98,6 +99,7 @@ dapr run --app-id order-app --dapr-grpc-port 3500 --log-level error -- ./order p
name: Run and get order
background: true
sleep: 5
timeout_seconds: 60
expected_stdout_lines:
- '== APP == dapr client initializing for: 127.0.0.1:3500'
- '== APP == Getting order'
Expand Down
11 changes: 2 additions & 9 deletions examples/pubsub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ expected_stdout_lines:
- 'event - PubsubName: messages, Topic: neworder'
background: true
sleep: 15
timeout_seconds: 60
-->

```bash
Expand All @@ -43,6 +44,7 @@ expected_stdout_lines:
- '== APP == data published'
background: true
sleep: 15
timeout_seconds: 60
-->

```bash
Expand All @@ -58,20 +60,11 @@ dapr run --app-id pub \

### Cleanup

<!-- STEP
expected_stdout_lines:
- '✅ app stopped successfully: sub'
expected_stderr_lines:
name: Shutdown dapr
-->

```bash
dapr stop --app-id sub
(lsof -i:8080 | grep sub) | awk '{print $2}' | xargs kill
```

<!-- END_STEP -->

## Result

```shell
Expand Down
12 changes: 2 additions & 10 deletions examples/service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ expected_stdout_lines:
- "ContentType:text/plain, Verb:POST, QueryString:, hellow"
background: true
sleep: 15
timeout_seconds: 60
-->

```bash
Expand Down Expand Up @@ -60,6 +61,7 @@ expected_stdout_lines:
- '== APP == output binding invoked'
background: true
sleep: 15
timeout_seconds: 60
-->

```bash
Expand Down Expand Up @@ -155,17 +157,7 @@ Uses the [config/cron.yaml](config/cron.yaml) component

### Cleanup

<!-- STEP
expected_stdout_lines:
- '✅ app stopped successfully: serving'
expected_stderr_lines:
name: Shutdown dapr
-->

```bash
dapr stop --app-id serving
(lsof -i:8080 | grep main) | awk '{print $2}' | xargs kill
```

<!-- END_STEP -->

2 changes: 2 additions & 0 deletions examples/socket/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ There are two ways to launch Dapr applications. You can pass the app executable
name: Run and send order
background: true
sleep: 5
timeout_seconds: 60
expected_stdout_lines:
- '== APP == dapr client initializing for: /tmp/dapr-order-app-grpc.socket'
- '== APP == Sending order ID 20'
Expand All @@ -86,6 +87,7 @@ dapr run --app-id order-app --log-level error --unix-domain-socket /tmp -- ./ord
name: Run and get order
background: true
sleep: 5
timeout_seconds: 60
expected_stdout_lines:
- '== APP == dapr client initializing for: /tmp/dapr-order-app-grpc.socket'
- '== APP == Getting order'
Expand Down
1 change: 1 addition & 0 deletions examples/workflow-parallel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ expected_stdout_lines:
background: true
sleep: 30
timeout_seconds: 60
-->

```bash
Expand Down
1 change: 1 addition & 0 deletions examples/workflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ expected_stdout_lines:
background: true
sleep: 60
timeout_seconds: 60
-->

```bash
Expand Down

0 comments on commit 7c03c7c

Please sign in to comment.