test(pubsub): add more publisher actor tests#4581
test(pubsub): add more publisher actor tests#4581PhongChuong wants to merge 3 commits intogoogleapis:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4581 +/- ##
=======================================
Coverage 95.02% 95.02%
=======================================
Files 195 195
Lines 7456 7456
=======================================
Hits 7085 7085
Misses 371 371 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| .withf(|req, _o| req.topic == TOPIC) | ||
| .times(5) | ||
| .returning({ | ||
| |r, o| { |
There was a problem hiding this comment.
optional: This test doesn't really verify that the order the messages go in is the order they show up in the requests.
You could send the requests out on an unbounded_channel...
google-cloud-rust/src/pubsub/src/subscriber/session.rs
Lines 395 to 397 in 76753ba
and verify the requests contained [m1, m2], [m3, m4], ... , [m9, m10] at the end of the test:
google-cloud-rust/src/pubsub/src/subscriber/session.rs
Lines 422 to 425 in 76753ba
There was a problem hiding this comment.
Thanks. Let me think about how to do this cleanly for all sequential actor tests and add it in a future PR.
No description provided.