From 8b65904bf59e0129c98f8ce1272a39d1f84fcea4 Mon Sep 17 00:00:00 2001 From: Andriy Svyryd Date: Wed, 9 Apr 2025 13:50:55 -0700 Subject: [PATCH] Disable Cosmos tests on CI --- azure-pipelines.yml | 25 ------------------- .../Query/AdHocJsonQueryCosmosTest.cs | 2 +- .../AdHocMiscellaneousQueryCosmosTest.cs | 2 +- 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 382f139f1d0..78837f93284 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -170,36 +170,11 @@ extends: - _runCounter: $[counter(variables['Build.Reason'], 0)] # Rely on task Arcade injects, not auto-injected build step. - skipComponentGovernanceDetection: true - - ${{ if notin(variables['Build.Reason'], 'PullRequest', 'Schedule') }}: - - _CosmosConnectionUrl: 'true' steps: - - bash: | - echo "##vso[task.setvariable variable=_CosmosConnectionUrl]https://ef-nightly-test.documents.azure.com:443/" - displayName: Prepare to run Cosmos tests on ef-nightly-test - condition: and(eq(variables['_CosmosConnectionUrl'], 'true'), or(endsWith(variables['_runCounter'], '0'), endsWith(variables['_runCounter'], '2'), endsWith(variables['_runCounter'], '4'), endsWith(variables['_runCounter'], '6'), endsWith(variables['_runCounter'], '8'))) - - bash: | - echo "##vso[task.setvariable variable=_CosmosConnectionUrl]https://ef-pr-test.documents.azure.com:443/" - displayName: Prepare to run Cosmos tests on ef-pr-test - condition: and(eq(variables['_CosmosConnectionUrl'], 'true'), or(endsWith(variables['_runCounter'], '1'), endsWith(variables['_runCounter'], '3'), endsWith(variables['_runCounter'], '5'), endsWith(variables['_runCounter'], '7'), endsWith(variables['_runCounter'], '9'))) - template: /eng/common/templates-official/steps/enable-internal-sources.yml - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml - script: eng/common/cibuild.sh --configuration $(_BuildConfig) --prepareMachine $(_InternalRuntimeDownloadArgs) displayName: Build - - task: AzureCLI@2 - displayName: Run Cosmos tests - condition: notin(variables['Build.Reason'], 'PullRequest', 'Schedule') - inputs: - azureSubscription: EFCosmosTesting - scriptType: bash - scriptLocation: 'inlineScript' - inlineScript: | - ./test.sh --ci --configuration $(_BuildConfig) --projects $(Build.SourcesDirectory)/test/EFCore.Cosmos.FunctionalTests/EFCore.Cosmos.FunctionalTests.csproj - env: - Test__Cosmos__DefaultConnection: $(_CosmosConnectionUrl) - Test__Cosmos__UseTokenCredential: true - Test__Cosmos__SubscriptionId: d709b837-4a74-4aec-addc-b6e4b9b23e7e - Test__Cosmos__ResourceGroup: efcosmosci - name: Build templateContext: outputs: - output: pipelineArtifact diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/AdHocJsonQueryCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/AdHocJsonQueryCosmosTest.cs index 979ad3d8ba0..563d63b7c08 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/AdHocJsonQueryCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/AdHocJsonQueryCosmosTest.cs @@ -159,7 +159,7 @@ protected override async Task Seed21006(Context21006 context) var wrapper = (CosmosClientWrapper)context.GetService(); var singletonWrapper = context.GetService(); - var entitiesContainer = singletonWrapper.Client.GetContainer(StoreName, containerId: "Entities"); + var entitiesContainer = singletonWrapper.Client.GetContainer(TestStore.Name, containerId: "Entities"); var missingTopLevel = $$""" diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/AdHocMiscellaneousQueryCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/AdHocMiscellaneousQueryCosmosTest.cs index 9365b6dfc7e..fb9c9bc95f7 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/AdHocMiscellaneousQueryCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/AdHocMiscellaneousQueryCosmosTest.cs @@ -45,7 +45,7 @@ protected async Task Seed21006(JsonContext21006 context) { var wrapper = (CosmosClientWrapper)context.GetService(); var singletonWrapper = context.GetService(); - var entitiesContainer = singletonWrapper.Client.GetContainer(StoreName, containerId: "Entities"); + var entitiesContainer = singletonWrapper.Client.GetContainer(TestStore.Name, containerId: "Entities"); var missingTopLevel = $$"""