-
Notifications
You must be signed in to change notification settings - Fork 156
Fix VirtualMCP e2e test port accessibility checks #2978
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2978 +/- ##
==========================================
+ Coverage 56.02% 56.08% +0.06%
==========================================
Files 328 328
Lines 32342 32373 +31
==========================================
+ Hits 18120 18158 +38
+ Misses 12676 12675 -1
+ Partials 1546 1540 -6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull request overview
This PR enhances e2e test reliability by adding port accessibility checks before attempting MCP client connections. The changes address EOF errors that occurred when tests tried to connect to services before the underlying pods were fully ready to accept connections.
Key Changes
- Added pod readiness verification within
WaitForVirtualMCPServerReadyto ensure pods are running and ready, not just checking CRD status - Added TCP port accessibility check in
GetVMCPNodePortto verify the NodePort is actually listening before returning - Introduced helper functions
checkPodsReadyandcheckPortOpento support the enhanced verification
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
87434ee to
97e5c76
Compare
Enhance test helpers to verify MCP server is actually listening before attempting client connections, preventing EOF errors. The original helpers only checked Kubernetes resource status (Ready condition and NodePort assignment) but didn't verify the actual pods were running or the port was accessible. This timing gap caused tests to fail with EOF errors when connecting to localhost:30020.
97e5c76 to
05d05f9
Compare
Enhance test helpers to verify MCP server is actually listening before attempting client connections, preventing EOF errors.
The original helpers only checked Kubernetes resource status (Ready condition and NodePort assignment) but didn't verify the actual pods were running or the port was accessible. This timing gap caused tests to fail with EOF errors when connecting.