Repository navigation
test(quic): cover receive-credit recovery and queue lifecycle - #39
Merged
Merged
Conversation
hatoo
enabled auto-merge (squash)
October 21, 2026 11:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Receive-credit queue changes need coverage for response streams that outgrow their initial window, lose MAX_STREAM_DATA grants, and retire while grants remain queued. Add six regressions covering the queue lifecycle and an independent Quinn peer that sends five patterned streams through many small receive windows.
The live recovery fixture withholds every fresh grant for one stream until loss recovery resends its current limit, then exercises reordered and duplicated encrypted grants. It checks decrypted limits, every response byte, FIN events, and peer-side acknowledgement of completion. Disabling lost MAX_STREAM_DATA requeuing makes this fixture fail with the target stream stuck at its initial 1,024-byte limit.
Additional tests compare LIFO grant order against a model across 10,000 operations and varied packet budgets; cover failed consumes, duplicate reads/losses, updated limits, FIN/reset before emission, sparse request ACKs, retirement and buffer reuse. The change adds only test modules; production behavior and dependencies are unchanged.
Validation:
cargo test --locked: 519 unit and 63 integration tests pass; 2 pre-existing ignored tests.cargo test --release --locked: the same test counts pass.cargo clippy --locked --all-targets -- -D warningsandcargo fmt --checkpass.The small receive windows are transport test parameters, not a production configuration or a performance claim.