fauna / fauna-go

Go driver for Fauna v10 (current)
https://fauna.com
Mozilla Public License 2.0
6 stars 3 forks source link

Linearize streaming client to prevent flaky tests #147

Closed erickpintor closed 7 months ago

erickpintor commented 7 months ago

There's one class of flaky tests which emerges from the fact that a read-only query to create a stream token will contain a snapshot time instead of a transaction time as its starting time. Subsequent writes may come back with a txn time lower than the stream's starting time, which can't be used as a resumable point. Making the test client linearized just makes testing more reliable here.

erickpintor commented 7 months ago

We ended up adding fix on the database side that is meant to prevent this scenario. I'll follow up on the fix there.