Skip to content

test: support dual-server E2E integration tests and protocol negotiation fallbacks#413

Open
anubhav756 wants to merge 2 commits into
anubhav-sep-2243from
anubhav-test-infra
Open

test: support dual-server E2E integration tests and protocol negotiation fallbacks#413
anubhav756 wants to merge 2 commits into
anubhav-sep-2243from
anubhav-test-infra

Conversation

@anubhav756

@anubhav756 anubhav756 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Overview

This PR updates the E2E testing infrastructure to support running integration tests against multiple parallel server configurations, specifically:

  1. A standard Toolbox server (port 5000).
  2. A draft-enabled Toolbox server (port 5001) run with the --enable-draft-specs flag.

By verifying the SDK's behavior against both environments, we ensure robust fallback and negotiation behavior when newer protocol drafts are configured.

Changes

1. E2E Test Infrastructure & Multi-Server Orchestration

  • Updated to start and monitor two separate instances of the Toolbox server process:
    • ToolboxServer1 on port 5000 (stable).
    • ToolboxServer2 on port 5001 (with --enable-draft-specs).
  • Introduced a helper killServer to gracefully terminate both server processes and clean up assets.
  • Added support for a second process reference.

2. E2E Test Suites

  • Refactored E2E tests in both @toolbox-sdk/core and @toolbox-sdk/adk to run all test cases against both servers (localhost:5000 and localhost:5001).
  • Added Protocol Configuration E2E Tests which:
    • Check that the client defaults to the correct protocol version if none is specified.
    • Verify that the client successfully negotiates and falls back to an older supported protocol (MCP_v20251125) if the target server does not support the client's configured draft protocol (MCP_DRAFT_2026_v1).

3. Protocol & Client Updates

  • Removed the verbose warning in ToolboxClient's constructor that alerted when initializing with a version other than MCP_LATEST.
    • This prevents spam when fallback / auto-negotiation takes place.

Note

This PR updates Protocol.MCP_LATEST to point to Protocol.MCP_DRAFT_2026_v1. This will be updated in the next PR down the chain (#394).

4. GCS Download Path Fix

  • Fixed GCS download paths by removing the v prefix from the version directory, resolving download failures during local test runs.

5. Unit Test Adjustments

  • Equipped MockTransport in client/tool unit tests with a mock protocolVersion property to satisfy current transport interface requirements.
  • Removed obsolete assertions in unit tests checking for the deleted MCP_LATEST console warnings.

Note

This PR mirrors Python SDK changes from googleapis/mcp-toolbox-sdk-python#706.

@anubhav756
anubhav756 requested a review from a team as a code owner July 17, 2026 15:57
@anubhav756
anubhav756 changed the base branch from anubhav-draft-negotiation to anubhav-sep-2243 July 17, 2026 16:02
@anubhav756
anubhav756 force-pushed the anubhav-test-infra branch from 4e4fd46 to 91f49d9 Compare July 17, 2026 16:14
@anubhav756 anubhav756 changed the title test: re-apply integration test dual-server support and parameterized test loops test: support dual-server E2E integration tests and protocol negotiation fallbacks Jul 17, 2026
@anubhav756
anubhav756 force-pushed the anubhav-test-infra branch 5 times, most recently from ee50bc8 to 618c662 Compare July 17, 2026 22:54
@anubhav756
anubhav756 force-pushed the anubhav-test-infra branch from 618c662 to 3c0859f Compare July 17, 2026 23:03
@anubhav756 anubhav756 added the priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. label Jul 18, 2026
@anubhav756
anubhav756 force-pushed the anubhav-test-infra branch from 8ae0d7a to 5106002 Compare July 18, 2026 04:35
@anubhav756
anubhav756 force-pushed the anubhav-test-infra branch from 5106002 to 8c56f1a Compare July 19, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants