Fix flaky MCPRemoteProxy integration test#3993
Merged
Merged
Conversation
Replace point-in-time GetRemoteProxyPhase() assertions with statusHelper.WaitForPhase() which uses Eventually with polling. The controller performs two separate status updates during reconciliation (ToolConfigHash first, then Phase). The test could read the object after the first update but before the second, seeing an empty Phase. Using WaitForPhase retries until the Phase is set or the timeout elapses. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
yrobla
approved these changes
Mar 4, 2026
reyortiz3
pushed a commit
that referenced
this pull request
Mar 4, 2026
Replace point-in-time GetRemoteProxyPhase() assertions with statusHelper.WaitForPhase() which uses Eventually with polling. The controller performs two separate status updates during reconciliation (ToolConfigHash first, then Phase). The test could read the object after the first update but before the second, seeing an empty Phase. Using WaitForPhase retries until the Phase is set or the timeout elapses. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
GetRemoteProxyPhase()assertions withstatusHelper.WaitForPhase()which usesEventuallywith polling""instead of"Pending"due to a timing gap between two separate status updates in the controller's reconciliationRoot cause
The controller performs two sequential status updates:
ToolConfigHashfirst, thenPhase. The test waited forToolConfigHash(usingEventually), then did a single-shot read of Phase — which could see the object after update #1 but before update #2 completed.Test plan
task lintpassestask operator-test-integrationpasses (all 7 suites)🤖 Generated with Claude Code