mongodb / mongo-rust-driver

The official MongoDB Rust Driver
https://www.mongodb.com/docs/drivers/rust/current/
Apache License 2.0
1.44k stars 164 forks source link

RUST-1425 Clarify test event handling #1188

Closed abr-egn closed 1 month ago

abr-egn commented 1 month ago

RUST-1425

I've spent some time trying various approaches here, and I've come to the conclusion that the status quo is good, actually.

The status quo:

Some approaches I've tried to boil this down to a single unified handler:

My position now is that buffering and streaming are both reasonable views of events generated during a span of action and which is more natural for a given test will depend quite a bit on the particulars. What I've done in this PR is (hopefully) clarify that distinction and how it should be used: