Use shared Test Proxy instance in CI#2795
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the CI recorded-test infrastructure to use a single shared Azure SDK Test Proxy instance per build job (instead of each RecordedCommandTestsBase/fixture starting its own proxy), aiming to reduce startup overhead and improve test throughput.
Changes:
- Start a shared Test Proxy instance in the build job and add steps to shut it down and dump its logs.
- Update the
TestProxytest helper to skip starting a local proxy in CI and to assume the shared proxy is available on port5000.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| eng/pipelines/templates/jobs/build.yml | Starts a shared test-proxy for the job, then shuts it down and publishes proxy logs for diagnostics. |
| core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Tests/Client/TestProxy.cs | Refactors proxy management to use a shared CI proxy (port 5000) and tightens internal state/output handling. |
|
This work will be put on to the backlog as there are larger changes needed to get this to work as the HTTP client that is redirected to Test Proxy lives within the MCP executable that is started on a per test class basis. Using a shared Test Proxy instance requires |
What does this PR do?
Migrates CI testing to use a shared Test Proxy instance instead of each
RecordedCommandTestBaseinstance starting its own Test Proxy instance. Test Proxy scales well and is capable of handling many incoming requests at one time, removing the number of Test Proxy instances should significantly speed up CI testing times.GitHub issue number?
[Link to the GitHub issue this PR addresses]Pre-merge Checklist
servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentationREADME.mdchanges running the script./eng/scripts/Process-PackageReadMe.ps1. See Package READMEToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test promptsconsolidated-tools.jsonbreaking-changelabelservers/Azure.Mcp.Server/docs/azmcp-commands.md./eng/scripts/Update-AzCommandsMetadata.ps1to update tool metadata inazmcp-commands.md(required for CI)servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline