Skip to content

Fix flaky XREADGROUP BLOCK CLAIM tests - #16119

Merged
sggeorgiev merged 2 commits into
redis:unstablefrom
sggeorgiev:fix-flaky-claim-tests
Oct 30, 2026
Merged

sggeorgiev merged 2 commits into
redis:unstablefrom
sggeorgiev:fix-flaky-claim-tests

Conversation

@sggeorgiev

@sggeorgiev sggeorgiev commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Two stream-cgroups.tcl tests block with CLAIM 1000 and expect XNACK or XADD to wake the client before the entries become claimable by idle time. If the command arrives about 1 s late (a slow runner, or a helper that sleeps instead of polling), the idle claim wins and the test fails. This is a test-only change.

Changes

Raise the CLAIM threshold in both tests (tests/unit/type/stream-cgroups.tcl)
BLOCK 5000 CLAIM 1000 is now BLOCK 20000 CLAIM 10000, so only XNACK or XADD can wake the client. The XNACK test now also fails if XNACK stops waking the client; before, the idle timer hid that.

Tighten the new-message test (tests/unit/type/stream-cgroups.tcl)
It now asserts that the returned entry is 2-0. The # comment after after 100 is removed: Tcl treated it as arguments, so the sleep never ran.


Note

Low Risk
Changes are limited to integration tests; no server or production code paths are modified.

Overview
Test-only hardening in tests/unit/type/stream-cgroups.tcl for two blocking XREADGROUP … BLOCK … CLAIM cases that were racing with a 1s idle-claim threshold on slow runners.

Both tests now use BLOCK 20000 CLAIM 10000 instead of BLOCK 5000 CLAIM 1000, so the blocked client should unblock only from XADD or XNACK, not from pending entries becoming claimable by idle time.

The “new message before min-idle-time” test also fixes after 100 ;# … (space before # broke the sleep in Tcl) and asserts the returned ID is 2-0, so a pass means the new entry woke the client, not an idle claim of 1-0.

Reviewed by Cursor Bugbot for commit 8f25a45. Bugbot is set up for automated code reviews on this repo. Configure here.

@sggeorgiev
sggeorgiev requested review from skaslev and sundb October 29, 2026 13:34
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T13:42:35.346401Z 4595b8a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.43%. Comparing base (c039dd7) to head (8f25a45).
⚠️ Report is 16 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable   #16119      +/-   ##
============================================
+ Coverage     78.03%   78.43%   +0.40%     
============================================
  Files           156      156              
  Lines         93049    95120    +2071     
============================================
+ Hits          72607    74610    +2003     
- Misses        20442    20510      +68     

see 59 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread tests/unit/type/stream-cgroups.tcl Resolved
@sggeorgiev
sggeorgiev merged commit 6a5fee6 into redis:unstable Oct 30, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants