Repository navigation
fix(test): wait for ConfigMaps before updating them in MultipleSecondaryEventSourceIT - #3739
Merged
csviri merged 1 commit intoDec 3, 2026
Conversation
…aryEventSourceIT The initial await used `getNumberOfExecutions() <= 3`, which already holds while the reconciler has not run at all, so it only ever waited for the 300ms poll delay. On a slow runner the first reconciliation had not created the ConfigMaps yet, and updateConfigMap failed with a NullPointerException on the missing ConfigMap. Wait until both ConfigMaps exist before taking the baseline execution count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified with the added wait for both ConfigMaps to exist before proceeding.
No open issues 🎉
What changed in this PR
Addresses an intermittent null-pointer failure in MultipleSecondaryEventSourceIT by waiting for both ConfigMaps to exist before proceeding.
Changes:
- Adds an Awaitility check with AssertJ non-null assertions for both ConfigMaps.
- Leaves the existing execution-count wait and subsequent test logic unchanged.
| File | Description |
|---|---|
| operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/multiplesecondaryeventsource/MultipleSecondaryEventSourceIT.java | Waits for ConfigMap creation before taking the execution baseline and updating resources. |
Review effort: Balanced
gaborgsomogyi
approved these changes
Dec 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MultipleSecondaryEventSourceIT.receivingPeriodicEventsfails intermittently in CI (example run, from #3733):The first wait in the test is:
<= 3is already true while the reconciler has not run, so this always returns once the 300ms poll delay is over. The test then reads the ConfigMaps that the first reconciliation creates. In the failing run that reconciliation started at12:08:19.123and was still running when the test readtestresource1at around12:08:19.43. The ConfigMap didn't exist yet, so the test hit the NPE.This PR waits until both ConfigMaps exist before the existing wait and before the baseline execution count is taken. The rest of the test is unchanged.
Test-only change. I verified it with
spotless:checkandtest-compile; I did not run the IT locally because it needs a cluster.🤖 Generated with Claude Code
Summary by CodeRabbit