Repository navigation
test: fix flaky TriggerReconcilerOnAllEventIT.additionalEventDuringRetryOnDeleteEvent - #3634
Conversation
…tryOnDeleteEvent The test assumed at least 3 reconciliations happen before the reconciler starts waiting on the first retry. If the delete event arrives before the first reconciliation reads the resource, the finalizer-adding reconciliation is skipped, the reconciler starts waiting at count 2, and the test and the reconciler block on each other until timeout. Wait for the reconciler to be waiting and snapshot the event count then instead.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe retry test now waits until the reconciler is waiting before capturing the event count. Comments explain why the initial reconciliation count can vary and why the count is stable while the reconciler waits. ChangesRetry test synchronization
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Other Merge Risk: ⚪ Minimal · up to The test waits for the reconciler to enter its waiting state before capturing the event count. The snapshot is safe, and no actionable merge risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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.
Copilot review overview
🟢 Approval recommended
The test synchronization fix addresses the reported flakiness without unresolved issues.
Review effort: Lite
Findings: None
What changed in this PR
Fixes a flaky integration test by synchronizing on the reconciler’s retry-waiting state instead of assuming a fixed reconciliation count.
Changes:
- Waits for retry waiting before snapshotting the event count.
- Handles deletion races deterministically.
| File | Description |
|---|---|
operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/triggerallevent/eventing/TriggerReconcilerOnAllEventIT.java |
Makes retry-event test synchronization robust. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The test assumed at least 3 reconciliations happen before the reconciler
starts waiting on the first retry. If the delete event arrives before the
first reconciliation reads the resource, the finalizer-adding reconciliation
is skipped, the reconciler starts waiting at count 2, and the test and the
reconciler block on each other until timeout.
Wait for the reconciler to be waiting and snapshot the event count then
instead.
Summary by CodeRabbit