You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
net: framed: property testing FrameWrite is cancel safe (#939)
Summary:
Pull Request resolved: #939
i see now that D80626978 has most of what the following comment states. clearly i messed up the rebase. this is just a small continuation of that.
introduce proptest-based property tests for `FrameWrite` cancellation safety. add proptest dev/test deps; factor test harness (`Throttled`, `SharedWriter`, `Gate`, `BudgetedWriter`, `budget_drips`) into `test_support`; add generator sanity check (`test_budget_sequence`). new property `test framewrite_cancellation_is_safe` uses `assert_cancel_safe_async` to cancel/restart send at arbitrary poll boundaries under fuzzed budget drip sequences, with shared gate+writer ensuring state persists. wrap in timeout to catch regressions; verify emitted frame matches body. behavior is unchanged; we now exercise cancel-safety as a theorem.
currently the property test covers only flat byte buffers (written for pre D80704703); the next diff in the stack will extend it to multipart buffers, exercising the same cancel-safety guarantees when a frame body is split across multiple `Part`s.
Reviewed By: mariusae
Differential Revision: D80651806
fbshipit-source-id: fade3043596c7bb942e3538c444aa5a1c963c7c3
0 commit comments