Skip to content

Add scripts to run Cosmos tests on a container#37110

Open
AndriySvyryd wants to merge 4 commits intomainfrom
TestHelixCosmos
Open

Add scripts to run Cosmos tests on a container#37110
AndriySvyryd wants to merge 4 commits intomainfrom
TestHelixCosmos

Conversation

@AndriySvyryd
Copy link
Member

@AndriySvyryd AndriySvyryd commented Nov 7, 2025

Run Cosmos tests on a Linux container emulator in Helix
Don't skip tests if emulator not available
Make the Cosmos emulator available for Copilot

Fixes #19973

@AndriySvyryd AndriySvyryd requested a review from a team November 7, 2025 03:36
@AndriySvyryd
Copy link
Member Author

@AndriySvyryd AndriySvyryd enabled auto-merge (squash) December 17, 2025 01:01
@AndriySvyryd
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copilot AI review requested due to automatic review settings January 12, 2026 20:29
Copy link

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 configures the Cosmos DB emulator to use port 8800 specifically for Helix CI runs and adds a mechanism to skip connection checks to prevent tests from being skipped when the emulator is not immediately available.

Changes:

  • Adds a SkipConnectionCheck configuration flag that bypasses connection availability checks
  • Configures Helix Windows builds to use port 8800 for the Cosmos emulator and skip connection checks
  • Simplifies the GitHub Actions Cosmos test workflow by combining restore, build, and test into a single command

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
test/EFCore.Cosmos.FunctionalTests/TestUtilities/TestEnvironment.cs Adds SkipConnectionCheck property to read configuration for bypassing connection checks
test/EFCore.Cosmos.FunctionalTests/TestUtilities/CosmosTestStore.cs Updates IsConnectionAvailableAsync to return true immediately when SkipConnectionCheck is enabled
eng/helix.proj Adds Cosmos test configuration for Windows Helix queues with port 8800 and connection check skip
.github/workflows/TestCosmos.yaml Simplifies workflow by combining build and test steps, adds SkipConnectionCheck environment variable

@AndriySvyryd
Copy link
Member Author

The tests are now failing with

       Microsoft.EntityFrameworkCore.Storage.RetryLimitExceededException : The maximum number of retries (10) was exceeded while executing database operations with 'TestCosmosExecutionStrategy'. See the inner exception for the most recent failure.
      ---- Microsoft.Azure.Cosmos.CosmosException : Response status code does not indicate success: ServiceUnavailable (503); Substatus: 20003; ActivityId: ad961a25-4cb0-4a83-b8ab-21017b93f97e; Reason: (GatewayStoreClient Request Timeout. Start Time UTC:1/12/2026 10:43:24 PM; Total Duration:36003.5648 Ms; Request Timeout 20000 Ms; Http Client Timeout:1200000 Ms; Activity id: ad961a25-4cb0-4a83-b8ab-21017b93f97e;);; Diagnostics:{"Summary":{},"name":"Account Read","start datetime":"2026-01-12T22:43:24.301Z","duration in milliseconds":36002.4951}
      --------- System.Threading.Tasks.TaskCanceledException : The operation was canceled.
      ------------ System.Threading.Tasks.TaskCanceledException : The operation was canceled.
      ---------------- System.IO.IOException : Unable to read data from the transport connection: The I/O operation has been aborted because of either a thread exit or an application request..
      -------------------- System.Net.Sockets.SocketException : The I/O operation has been aborted because of either a thread exit or an application request.

@roji roji force-pushed the main branch 2 times, most recently from 249ae47 to 6b86657 Compare January 13, 2026 17:46
@AndriySvyryd AndriySvyryd marked this pull request as draft February 12, 2026 01:59
auto-merge was automatically disabled February 12, 2026 01:59

Pull request was converted to draft

@AndriySvyryd AndriySvyryd self-assigned this Feb 23, 2026
@AndriySvyryd AndriySvyryd force-pushed the TestHelixCosmos branch 2 times, most recently from 857aad5 to 162a9e2 Compare March 16, 2026 21:05
@AndriySvyryd AndriySvyryd requested a review from Copilot March 16, 2026 21:07
Copy link

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

Copilot reviewed 31 out of 31 changed files in this pull request and generated 8 comments.


You can also share your feedback on Copilot code review. Take the survey.

@AndriySvyryd AndriySvyryd changed the title Use port 8800 for Cosmos emulator on Helix Add scripts to run Cosmos tests on a container Mar 16, 2026
@AndriySvyryd AndriySvyryd force-pushed the TestHelixCosmos branch 3 times, most recently from 7ad563e to 61aef7c Compare March 16, 2026 23:53
Don't skip tests if emulator not available
@AndriySvyryd AndriySvyryd marked this pull request as ready for review March 16, 2026 23:56
Copilot AI review requested due to automatic review settings March 16, 2026 23:56
Copy link

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

Copilot reviewed 44 out of 44 changed files in this pull request and generated 4 comments.


You can also share your feedback on Copilot code review. Take the survey.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 17, 2026 00:14
Copy link

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

Copilot reviewed 44 out of 44 changed files in this pull request and generated 4 comments.


You can also share your feedback on Copilot code review. Take the survey.

@AndriySvyryd AndriySvyryd assigned roji and unassigned AndriySvyryd Mar 17, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 17, 2026 00:41
Copy link

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

Copilot reviewed 44 out of 44 changed files in this pull request and generated 2 comments.


You can also share your feedback on Copilot code review. Take the survey.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 17, 2026 00:50
Copy link

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

Copilot reviewed 44 out of 44 changed files in this pull request and generated 2 comments.


You can also share your feedback on Copilot code review. Take the survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run Cosmos tests on Helix

5 participants