From 12aade7d422f0dd9c24bb0c3cc62d11798216005 Mon Sep 17 00:00:00 2001 From: Matthew Fisher <40250218+MicroFish91@users.noreply.github.com> Date: Thu, 20 Jun 2024 15:22:15 -0700 Subject: [PATCH] Enable long running tests (#2283) --- .azure-pipelines/1esmain.yml | 8 ++++++++ test/global.test.ts | 2 ++ 2 files changed, 10 insertions(+) diff --git a/.azure-pipelines/1esmain.yml b/.azure-pipelines/1esmain.yml index cd1f5ff8..47b4aae1 100644 --- a/.azure-pipelines/1esmain.yml +++ b/.azure-pipelines/1esmain.yml @@ -24,6 +24,14 @@ resources: ref: main endpoint: GitHub-AzureTools # The service connection to use when accessing this repository +parameters: + - name: enableLongRunningTests + displayName: Enable Long Running Tests + type: boolean + default: true + # Use those templates extends: template: azure-pipelines/1esmain.yml@azExtTemplates + parameters: + useAzureFederatedCredentials: ${{ parameters.enableLongRunningTests }} diff --git a/test/global.test.ts b/test/global.test.ts index f3fd3867..9cb45560 100644 --- a/test/global.test.ts +++ b/test/global.test.ts @@ -7,6 +7,8 @@ import { TestOutputChannel, TestUserInput } from '@microsoft/vscode-azext-dev'; import * as vscode from 'vscode'; import { ext, registerOnActionStartHandler } from '../extension.bundle'; +export const longRunningTestsEnabled: boolean = !/^(false|0)?$/i.test(process.env.AzCode_UseAzureFederatedCredentials || ''); + // Runs before all tests suiteSetup(async function (this: Mocha.Context): Promise { this.timeout(2 * 60 * 1000);