chore(tests): fix kv alloc underflow and PQ start-count flakiness - #227
Conversation
Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
|
Warning Review limit reached
Next review available in: 38 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR fixes two flaky/incorrect tests by making their assertions robust to runtime variability (Go GC effects and timing-dependent job re-dispatch loops).
Changes:
- Prevent
uint64underflow inTestSetManyMemoryby guarding thecurrAlloc - prevAllocsubtraction. - Make
TestMemoryPQresilient to timing variance by asserting a lower bound (instead of an exact count) for “job processing was started” log entries.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/kv_memory_test.go | Avoids false-positive “memory leak” failures when GC reduces Alloc below the pre-test baseline. |
| tests/jobs_memory_test.go | Removes a timing-sensitive exact-count assertion and replaces it with a lower-bound check for job start logs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ar span Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #227 +/- ##
===========================================
+ Coverage 0 77.02% +77.02%
===========================================
Files 0 6 +6
Lines 0 518 +518
===========================================
+ Hits 0 399 +399
- Misses 0 87 +87
- Partials 0 32 +32 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Two test fixes: