Refresh Cosmos recorded test assets - #3351
Open
Chidozie Ononiwu (chidozieononiwu) wants to merge 2 commits into
Open
Refresh Cosmos recorded test assets#3351Chidozie Ononiwu (chidozieononiwu) wants to merge 2 commits into
Chidozie Ononiwu (chidozieononiwu) wants to merge 2 commits into
Conversation
Chidozie Ononiwu (chidozieononiwu)
requested a review
from a team
as a code owner
August 22, 2026 01:32
Chidozie Ononiwu (chidozieononiwu)
requested review from
KarishmaGhiya,
Larry Osterman (LarryOsterman),
Alan Zimmer (alzimmermsft),
Connie Yau (conniey),
Vinay Gera (g2vinay),
msalaman and
Steven Vukelich (vukelich)
and
a lite review from Copilot
and removed request for
Copilot
August 22, 2026 01:32
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
Copilot started reviewing on behalf of
Chidozie Ononiwu (chidozieononiwu)
August 25, 2026 20:59
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refreshes Cosmos recorded-test asset references and adjusts Cosmos/test behaviors to reduce failures during credential/key auth scenarios and flaky integration-style test interactions.
Changes:
- Updated Cosmos test
assets.jsonTagto point at the latest azure-sdk-assets snapshot. - Removed the Cosmos client “validation” call (
ReadAccountAsync) during client creation, shifting auth failures to the first real database operation. - Increased the JSON-RPC response read timeout in consolidated-mode server tests (10s → 30s) to reduce flakiness.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tools/Azure.Mcp.Tools.Cosmos/tests/Azure.Mcp.Tools.Cosmos.Tests/CosmosServiceTests.cs | Updates test comments to match the new behavior (failures occur during database operations, not client validation). |
| tools/Azure.Mcp.Tools.Cosmos/tests/Azure.Mcp.Tools.Cosmos.Tests/assets.json | Bumps recorded-test assets Tag to a newer snapshot. |
| tools/Azure.Mcp.Tools.Cosmos/src/Services/CosmosService.cs | Removes the lightweight client validation (ReadAccountAsync) during Cosmos client creation. |
| servers/Azure.Mcp.Server/tests/Azure.Mcp.Server.Tests/Infrastructure/ConsolidatedModeTests.cs | Extends the read timeout used when awaiting JSON-RPC responses to reduce test flakiness. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
This pull request primarily refactors the Cosmos client creation flow in
CosmosServiceby removing the explicit validation step, and updates related test comments for clarity. It also increases the timeout for reading JSON-RPC responses in a test and updates a test asset tag.Cosmos client creation and validation:
ValidateCosmosClientAsyncmethod and the call to it inCreateCosmosClientWithAuth, so the client is no longer validated with a lightweight operation immediately after creation. This simplifies the client initialization process. [1] [2]Test updates and clarifications:
CosmosServiceTests.csto clarify that failures occur during database operations, not during client validation or creation. [1] [2] [3] [4]ConsolidatedMode_Should_Interop_With_Legacy_Initialize_Handshato reduce test flakiness.Test asset update:
Updated the test asset tag in
assets.jsonto a new value.This pull request makes a minor update to the test assets configuration by changing theTagvalue in theassets.jsonfile. This typically reflects a new version or state of the assets used for testing.Updated the
Tagfield inassets.jsontoAzure.Mcp.Tools.Cosmos.Tests_241ef3d966to reference the latest asset version.#3315