-
Notifications
You must be signed in to change notification settings - Fork 6
test(ledger): increase sleep timer for fail check #1086
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Chris Gianelloni <[email protected]>
📝 WalkthroughWalkthroughThis pull request modifies a test file in the timer component. Specifically, in Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
ledger/timer_test.go (1)
96-107: Longer task sleep should reduce flakiness and still satisfy the assertionBumping the inner
time.Sleepin the task from 50ms to 100ms (with a 10ms tick and 3‑tick interval) keeps the task running across multiple scheduled executions, so the fail func should fire at least as often as before while the test still only sleeps 200ms overall. This aligns with the PR goal of making the fail‑path check more robust.If this test remains flaky in slower or jittery environments, you could optionally derive the inner sleep from the tick/interval (e.g., a small multiple of
3 * 10 * time.Millisecond) to make the timing relationship explicit and easier to adjust later, but it's not required for correctness here.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
ledger/timer_test.go(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: cubic · AI code reviewer
- GitHub Check: go-test (1.24.x, macos-latest)
- GitHub Check: go-test (1.25.x, macos-latest)
- GitHub Check: go-test (1.24.x, windows-latest)
- GitHub Check: go-test (1.25.x, windows-latest)
- GitHub Check: nilaway
- GitHub Check: lint
- GitHub Check: Analyze (go)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 1 file
Summary by cubic
Increase sleep in TestSchedulerRunFailFunc from 50ms to 100ms to stabilize the fail-check timing. This reduces flakiness by giving the task enough time to trigger the run-fail callback, especially on slower CI.
Written for commit 22e9526. Summary will update automatically on new commits.
Summary by CodeRabbit
Note: This release contains internal test improvements with no user-facing changes.
✏️ Tip: You can customize this high-level summary in your review settings.