diff --git a/.github/workflows/TestCosmos.yaml b/.github/workflows/TestCosmos.yaml
index f51e43168be..d1f1605c412 100644
--- a/.github/workflows/TestCosmos.yaml
+++ b/.github/workflows/TestCosmos.yaml
@@ -21,18 +21,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v5
-
- - name: Restore
- run: restore.cmd
- shell: cmd
-
+
- name: Build
- run: build.cmd /p:Projects=${{ github.workspace }}\test\EFCore.Cosmos.FunctionalTests\EFCore.Cosmos.FunctionalTests.csproj
- shell: cmd
-
- - name: Test on Cosmos
- run: test.cmd /p:Projects=${{ github.workspace }}\test\EFCore.Cosmos.FunctionalTests\EFCore.Cosmos.FunctionalTests.csproj
+ run: build.cmd -test /p:Projects=${{ github.workspace }}\test\EFCore.Cosmos.FunctionalTests\EFCore.Cosmos.FunctionalTests.csproj
shell: cmd
+ env:
+ Test__Cosmos__SkipConnectionCheck: true
- name: Publish Test Results
uses: actions/upload-artifact@v5
diff --git a/eng/helix.proj b/eng/helix.proj
index ef5b7577bc3..3f3db3b83e1 100644
--- a/eng/helix.proj
+++ b/eng/helix.proj
@@ -13,6 +13,7 @@
true
true
$(RepoRoot)/test/EFCore.SqlServer.FunctionalTests/*.csproj;$(RepoRoot)/test/EFCore.SqlServer.HierarchyId.Tests/*.csproj;$(RepoRoot)/test/EFCore.OData.FunctionalTests/*.csproj;$(RepoRoot)/test/EFCore.AspNet.SqlServer.FunctionalTests/*.csproj;$(RepoRoot)/test/EFCore.VisualBasic.FunctionalTests/*.vbproj
+ $(RepoRoot)/test/EFCore.Cosmos.FunctionalTests/*.csproj;
@@ -70,7 +71,14 @@
-
+
+
+
+
+
+ $(PreCommands);set Test__Cosmos__SkipConnectionCheck=true;set Test__Cosmos__DefaultConnection="https://localhost:8800"
+
+
net10.0
diff --git a/test/EFCore.Cosmos.FunctionalTests/TestUtilities/CosmosTestStore.cs b/test/EFCore.Cosmos.FunctionalTests/TestUtilities/CosmosTestStore.cs
index 6107763f180..12647526caf 100644
--- a/test/EFCore.Cosmos.FunctionalTests/TestUtilities/CosmosTestStore.cs
+++ b/test/EFCore.Cosmos.FunctionalTests/TestUtilities/CosmosTestStore.cs
@@ -96,6 +96,11 @@ public override DbContextOptionsBuilder AddProviderOptions(DbContextOptionsBuild
public static async ValueTask IsConnectionAvailableAsync()
{
+ if (TestEnvironment.SkipConnectionCheck)
+ {
+ return true;
+ }
+
if (_connectionAvailable == null)
{
await _connectionSemaphore.WaitAsync();
diff --git a/test/EFCore.Cosmos.FunctionalTests/TestUtilities/TestEnvironment.cs b/test/EFCore.Cosmos.FunctionalTests/TestUtilities/TestEnvironment.cs
index 37c0d2d4d0a..a95ba1fb899 100644
--- a/test/EFCore.Cosmos.FunctionalTests/TestUtilities/TestEnvironment.cs
+++ b/test/EFCore.Cosmos.FunctionalTests/TestUtilities/TestEnvironment.cs
@@ -46,4 +46,6 @@ public static class TestEnvironment
: Enum.Parse(Config["AzureLocation"]);
public static bool IsEmulator { get; } = !UseTokenCredential && (AuthToken == _emulatorAuthToken);
+
+ public static bool SkipConnectionCheck { get; } = Config["SkipConnectionCheck"] == "true";
}