Skip to content

fix: flaky Group error and timing test - #28

Merged
sderrow merged 2 commits into
mainfrom
sean/fix-group-error-flake
Oct 5, 2026
Merged

sderrow merged 2 commits into
mainfrom
sean/fix-group-error-flake

Conversation

@sderrow

@sderrow sderrow commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Flaky test fix. In a real redis situation, we can only assert the contract instead of exact timing: hold key A's first job with a deferred, then show B's failure reaches its caller and C runs both jobs while A is held, so keys don't share capacity, minTime, or failures. A then drains in order.

sderrow commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner Author

@sderrow
sderrow marked this pull request as ready for review October 5, 2026 02:58
@sderrow sderrow changed the title test: make Group error isolation test deterministic fix flaky Group error test Oct 5, 2026
@sderrow sderrow changed the title fix flaky Group error test fix flaky Group error and timing test Oct 5, 2026
@sderrow sderrow changed the title fix flaky Group error and timing test fix: flaky Group error and timing test Oct 5, 2026

sderrow commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner Author

Merge activity

  • Oct 5, 3:02 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Oct 5, 3:12 AM UTC: Graphite rebased this pull request as part of a merge.
  • Oct 5, 3:13 AM UTC: @sderrow merged this pull request with Graphite.

@sderrow
sderrow changed the base branch from sean/enable-more-lint-rules to graphite-base/28 October 5, 2026 03:07
@sderrow
sderrow changed the base branch from graphite-base/28 to main October 5, 2026 03:10
sderrow and others added 2 commits October 5, 2026 03:11
"Should pass error on failure" asserted an exact cross-key interleaving
([6] before [3]) that only held if a 40ms setTimeout fired inside a 100ms
minTime window. Under the redis projects the Group is still local but timers
are real, so an event-loop stall reordered the keys and failed the test.

Assert the contract instead: hold key A's first job with a deferred, then
show B's failure reaches its caller and C runs both jobs while A is held,
so keys don't share capacity, minTime, or failures. A then drains in order.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@sderrow
sderrow force-pushed the sean/fix-group-error-flake branch from 2d03b46 to 2356669 Compare October 5, 2026 03:11
@sderrow
sderrow merged commit 71c5708 into main Oct 5, 2026
11 checks passed
@sderrow
sderrow deleted the sean/fix-group-error-flake branch October 5, 2026 03:13
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.

1 participant