Skip to content

Conversation

@yrobla
Copy link
Contributor

@yrobla yrobla commented Dec 10, 2025

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.

@yrobla yrobla requested a review from Copilot December 10, 2025 09:06
@github-actions github-actions bot added the size/XS Extra small PR: < 100 lines changed label Dec 10, 2025
@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.08%. Comparing base (584cfe6) to head (5440d7e).
⚠️ Report is 7 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

Copilot AI left a 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 WaitForVirtualMCPServerReady to ensure pods are running and ready, not just checking CRD status
  • Added TCP port accessibility check in GetVMCPNodePort to verify the NodePort is actually listening before returning
  • Introduced helper functions checkPodsReady and checkPortOpen to support the enhanced verification

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yrobla yrobla force-pushed the fix_e2e_lifecycle_tests branch from 87434ee to 97e5c76 Compare December 10, 2025 11:55
@github-actions github-actions bot added size/S Small PR: 100-299 lines changed and removed size/XS Extra small PR: < 100 lines changed labels Dec 10, 2025
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.
@yrobla yrobla force-pushed the fix_e2e_lifecycle_tests branch from 97e5c76 to 05d05f9 Compare December 10, 2025 15:14
@github-actions github-actions bot added size/S Small PR: 100-299 lines changed and removed size/S Small PR: 100-299 lines changed labels Dec 10, 2025
JAORMX
JAORMX previously approved these changes Dec 10, 2025
@github-actions github-actions bot added size/S Small PR: 100-299 lines changed and removed size/S Small PR: 100-299 lines changed labels Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Small PR: 100-299 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants