Skip to content

Commit

Permalink
Merge pull request #148 from mikeee/pubsub-example-fix
Browse files Browse the repository at this point in the history
chore: fix pubsub validation example
  • Loading branch information
mikeee authored Mar 20, 2024
2 parents f642bd8 + 65f9fc7 commit 8a28b12
Showing 1 changed file with 82 additions and 8 deletions.
90 changes: 82 additions & 8 deletions examples/pubsub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,88 @@ To run this example:
<!-- STEP
name: Run Subscriber
output_match_mode: substring
match_order: none
match_order: sequential
expected_stdout_lines:
- '== APP - rust-subscriber == Message: 0 => hello from rust!'
- '== APP - rust-subscriber == Content-Type: text/plain'
- '== APP - rust-subscriber == Message: 1 => hello from rust!'
- '== APP - rust-subscriber == Content-Type: text/plain'
- '== APP - rust-subscriber == Message: 2 => hello from rust!'
- '== APP - rust-subscriber == Content-Type: text/plain'
- '== APP - rust-subscriber == Topic A - Order {'
- '== APP - rust-subscriber == order_number: 0,'
- '== APP - rust-subscriber == order_details: "Count is 0",'
- '== APP - rust-subscriber == }'
- '== APP - rust-subscriber == Topic A - Order {'
- '== APP - rust-subscriber == order_number: 1,'
- '== APP - rust-subscriber == order_details: "Count is 1",'
- '== APP - rust-subscriber == }'
- '== APP - rust-subscriber == Topic A - Order {'
- '== APP - rust-subscriber == order_number: 2,'
- '== APP - rust-subscriber == order_details: "Count is 2",'
- '== APP - rust-subscriber == }'
- '== APP - rust-subscriber == Topic A - Order {'
- '== APP - rust-subscriber == order_number: 3,'
- '== APP - rust-subscriber == order_details: "Count is 3",'
- '== APP - rust-subscriber == }'
- '== APP - rust-subscriber == Topic A - Order {'
- '== APP - rust-subscriber == order_number: 4,'
- '== APP - rust-subscriber == order_details: "Count is 4",'
- '== APP - rust-subscriber == }'
- '== APP - rust-subscriber == Topic A - Order {'
- '== APP - rust-subscriber == order_number: 5,'
- '== APP - rust-subscriber == order_details: "Count is 5",'
- '== APP - rust-subscriber == }'
- '== APP - rust-subscriber == Topic A - Order {'
- '== APP - rust-subscriber == order_number: 6,'
- '== APP - rust-subscriber == order_details: "Count is 6",'
- '== APP - rust-subscriber == }'
- '== APP - rust-subscriber == Topic A - Order {'
- '== APP - rust-subscriber == order_number: 7,'
- '== APP - rust-subscriber == order_details: "Count is 7",'
- '== APP - rust-subscriber == }'
- '== APP - rust-subscriber == Topic A - Order {'
- '== APP - rust-subscriber == order_number: 8,'
- '== APP - rust-subscriber == order_details: "Count is 8",'
- '== APP - rust-subscriber == }'
- '== APP - rust-subscriber == Topic A - Order {'
- '== APP - rust-subscriber == order_number: 9,'
- '== APP - rust-subscriber == order_details: "Count is 9",'
- '== APP - rust-subscriber == }'
- '== APP - rust-subscriber == Topic B - Refund {'
- '== APP - rust-subscriber == order_number: 0,'
- '== APP - rust-subscriber == refund_amount: 1200,'
- '== APP - rust-subscriber == }'
- '== APP - rust-subscriber == Topic B - Refund {'
- '== APP - rust-subscriber == order_number: 1,'
- '== APP - rust-subscriber == refund_amount: 1200,'
- '== APP - rust-subscriber == }'
- '== APP - rust-subscriber == Topic B - Refund {'
- '== APP - rust-subscriber == order_number: 2,'
- '== APP - rust-subscriber == refund_amount: 1200,'
- '== APP - rust-subscriber == }'
- '== APP - rust-subscriber == Topic B - Refund {'
- '== APP - rust-subscriber == order_number: 3,'
- '== APP - rust-subscriber == refund_amount: 1200,'
- '== APP - rust-subscriber == }'
- '== APP - rust-subscriber == Topic B - Refund {'
- '== APP - rust-subscriber == order_number: 4,'
- '== APP - rust-subscriber == refund_amount: 1200,'
- '== APP - rust-subscriber == }'
- '== APP - rust-subscriber == Topic B - Refund {'
- '== APP - rust-subscriber == order_number: 5,'
- '== APP - rust-subscriber == refund_amount: 1200,'
- '== APP - rust-subscriber == }'
- '== APP - rust-subscriber == Topic B - Refund {'
- '== APP - rust-subscriber == order_number: 6,'
- '== APP - rust-subscriber == refund_amount: 1200,'
- '== APP - rust-subscriber == }'
- '== APP - rust-subscriber == Topic B - Refund {'
- '== APP - rust-subscriber == order_number: 7,'
- '== APP - rust-subscriber == refund_amount: 1200,'
- '== APP - rust-subscriber == }'
- '== APP - rust-subscriber == Topic B - Refund {'
- '== APP - rust-subscriber == order_number: 8,'
- '== APP - rust-subscriber == refund_amount: 1200,'
- '== APP - rust-subscriber == }'
- '== APP - rust-subscriber == Topic B - Refund {'
- '== APP - rust-subscriber == order_number: 9,'
- '== APP - rust-subscriber == refund_amount: 1200,'
- '== APP - rust-subscriber == }'
- '== APP - rust-publisher == messages published'
background: true
sleep: 30
Expand All @@ -54,4 +128,4 @@ dapr run --app-id rust-subscriber --app-protocol grpc --app-port 50051 cargo run
2. Run the publisher with dapr
```bash
dapr run --app-id rust-publisher --app-protocol grpc cargo run -- --example publisher
```
```

0 comments on commit 8a28b12

Please sign in to comment.