Skip to content

Fix more tests for Linux Cosmos emulator#38118

Merged
AndriySvyryd merged 1 commit into
mainfrom
FixCosmosTests
Apr 16, 2026
Merged

Fix more tests for Linux Cosmos emulator#38118
AndriySvyryd merged 1 commit into
mainfrom
FixCosmosTests

Conversation

@AndriySvyryd
Copy link
Copy Markdown
Member

No description provided.

@AndriySvyryd AndriySvyryd requested a review from a team as a code owner April 16, 2026 04:39
Copilot AI review requested due to automatic review settings April 16, 2026 04:39
@AndriySvyryd AndriySvyryd enabled auto-merge (squash) April 16, 2026 04:39
Copy link
Copy Markdown

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 adjusts Cosmos functional tests to better behave under the Linux Cosmos emulator by deferring option creation until after test store initialization and by controlling whether an external service provider is used (to influence CosmosClient sharing behavior).

Changes:

  • Defer EmbeddedTransportationContextOptions creation until TestStore.InitializeAsync has updated connection details.
  • Add a useExternalServiceProvider switch in ConfigPatternsCosmosTest options creation and update the Cosmos client sharing test to opt out of an external provider.
  • Add a helper on the Cosmos fixture to create a service provider for UseInternalServiceProvider.

Reviewed changes

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

File Description
test/EFCore.Cosmos.FunctionalTests/EmbeddedDocumentsTest.cs Creates options inside the store initialization path to pick up updated connection details (e.g., after testcontainer/emulator setup).
test/EFCore.Cosmos.FunctionalTests/ConfigPatternsCosmosTest.cs Adds optional external service provider usage to control CosmosClient instance reuse across contexts and test stores.

Comment thread test/EFCore.Cosmos.FunctionalTests/ConfigPatternsCosmosTest.cs
Comment thread test/EFCore.Cosmos.FunctionalTests/ConfigPatternsCosmosTest.cs
@AndriySvyryd AndriySvyryd merged commit 4a0a4e5 into main Apr 16, 2026
20 checks passed
@AndriySvyryd AndriySvyryd deleted the FixCosmosTests branch April 16, 2026 05:32
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.

3 participants