Skip to content

Commit 75c1ca1

Browse files
net: framed: property testing FrameWrite is cancel safe (#939)
Summary: Pull Request resolved: #939 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. Differential Revision: D80651806
1 parent 67260af commit 75c1ca1

File tree

2 files changed

+497
-63
lines changed

2 files changed

+497
-63
lines changed

hyperactor/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ unicode-ident = "1.0.12"
6868

6969
[dev-dependencies]
7070
maplit = "1.0"
71+
proptest = "1.5"
7172
timed_test = { version = "0.0.0", path = "../timed_test" }
7273
tracing-subscriber = { version = "0.3.19", features = ["chrono", "env-filter", "json", "local-time", "parking_lot", "registry"] }
7374
tracing-test = { version = "0.2.3", features = ["no-env-filter"] }

0 commit comments

Comments
 (0)