fix: close dead-letter/stats read race in codel tests#457
Merged
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughCoDel overload tests in the Java, Node.js, and Python SDKs now refresh dead-letter snapshots after job-state convergence before asserting the number of CoDel-shed jobs. ChangesCoDel test convergence
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
The poll loop read dead letters before stats, so a job shed between the two reads left a stale count when the exit condition fired.
pratyush618
force-pushed
the
fix/codel-test-race
branch
from
July 19, 2026 02:52
956e49d to
9e71041
Compare
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.
Summary
The CoDel shed test polls
deadLettersthenstatsnon-atomically; a job shed between the two reads satisfies the exit condition (completed + dead == total) with a stale CoDel count, failingstats.dead == codelDead(seen on CI: expected 19 to be 18). Once converged nothing moves, so each test now rereads dead letters after the loop for the settled count. Same fix applied in all three SDK suites.Testing
vitest run test/core/codel.test.ts— 2 passed; biome + tsc cleanpytest tests/core/test_codel.py— 3 passed; ruff + mypy cleangradlew :test --tests CodelTest— 3 passedSummary by CodeRabbit