diff --git a/omnisharptest/omnisharpIntegrationTests/advisor.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/advisor.integration.test.ts index f82080a8d..a8845a1dc 100644 --- a/omnisharptest/omnisharpIntegrationTests/advisor.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/advisor.integration.test.ts @@ -8,7 +8,7 @@ import * as vscode from 'vscode'; import { expect, should } from 'chai'; import * as path from 'path'; import { activateCSharpExtension, isRazorWorkspace, isSlnWithGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/omnisharpTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import { Advisor } from '../../src/features/diagnosticsProvider'; diff --git a/omnisharptest/omnisharpIntegrationTests/codeActionRename.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/codeActionRename.integration.test.ts index ca79aa97d..bb0484903 100644 --- a/omnisharptest/omnisharpIntegrationTests/codeActionRename.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/codeActionRename.integration.test.ts @@ -7,7 +7,7 @@ import * as vscode from 'vscode'; import { should, expect } from 'chai'; import { activateCSharpExtension, isRazorWorkspace, isSlnWithGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/omnisharpTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import * as path from 'path'; import { assertWithPoll } from './poll'; import { isNotNull } from '../testUtil'; diff --git a/omnisharptest/omnisharpIntegrationTests/codeLensProvider.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/codeLensProvider.integration.test.ts index b8279cb14..3f2f0f313 100644 --- a/omnisharptest/omnisharpIntegrationTests/codeLensProvider.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/codeLensProvider.integration.test.ts @@ -8,7 +8,7 @@ import * as path from 'path'; import { should, expect } from 'chai'; import { activateCSharpExtension, isSlnWithCsproj, isSlnWithGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/omnisharpTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import { isNotNull } from '../testUtil'; suite(`CodeLensProvider: ${testAssetWorkspace.description}`, function () { diff --git a/omnisharptest/omnisharpIntegrationTests/completionProvider.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/completionProvider.integration.test.ts index aa87becf8..246a25ae4 100644 --- a/omnisharptest/omnisharpIntegrationTests/completionProvider.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/completionProvider.integration.test.ts @@ -5,7 +5,7 @@ import OmniSharpCompletionProvider from '../../src/features/completionProvider'; import * as vscode from 'vscode'; -import testAssetWorkspace from './testAssets/omnisharpTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import * as path from 'path'; import { use, expect, should } from 'chai'; import * as chaiArray from 'chai-arrays'; diff --git a/omnisharptest/omnisharpIntegrationTests/definitionProvider.test.ts b/omnisharptest/omnisharpIntegrationTests/definitionProvider.test.ts index 1a4ad235b..6683038f7 100644 --- a/omnisharptest/omnisharpIntegrationTests/definitionProvider.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/definitionProvider.test.ts @@ -6,7 +6,7 @@ import * as vscode from 'vscode'; import OmniSharpDefinitionProvider from '../../src/features/definitionProvider'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/omnisharpTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import { expect, should } from 'chai'; import { activateCSharpExtension, diff --git a/omnisharptest/omnisharpIntegrationTests/diagnostics.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/diagnostics.integration.test.ts index 4f9f796ba..d1eda9ab3 100644 --- a/omnisharptest/omnisharpIntegrationTests/diagnostics.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/diagnostics.integration.test.ts @@ -13,7 +13,7 @@ import { isSlnWithGenerator, restartOmniSharpServer, } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/omnisharpTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import { poll, assertWithPoll, pollDoesNotHappen } from './poll'; import { isNotNull } from '../testUtil'; diff --git a/omnisharptest/omnisharpIntegrationTests/documentSymbolProvider.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/documentSymbolProvider.integration.test.ts index 21b644e55..eca66ae76 100644 --- a/omnisharptest/omnisharpIntegrationTests/documentSymbolProvider.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/documentSymbolProvider.integration.test.ts @@ -8,7 +8,7 @@ import * as path from 'path'; import { should, expect } from 'chai'; import * as integrationHelpers from './integrationHelpers'; -import testAssetWorkspace from './testAssets/omnisharpTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; suite(`DocumentSymbolProvider: ${testAssetWorkspace.description}`, function () { let fileUri: vscode.Uri; diff --git a/omnisharptest/omnisharpIntegrationTests/documentationCommentAutoFormatting.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/documentationCommentAutoFormatting.integration.test.ts index 8cdca19ed..f5fa7a1de 100644 --- a/omnisharptest/omnisharpIntegrationTests/documentationCommentAutoFormatting.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/documentationCommentAutoFormatting.integration.test.ts @@ -8,7 +8,7 @@ import * as chaiArray from 'chai-arrays'; import * as vscode from 'vscode'; import * as path from 'path'; import { isRazorWorkspace, isSlnWithGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/omnisharpTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; use(chaiArray); diff --git a/omnisharptest/omnisharpIntegrationTests/dotnetTest.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/dotnetTest.integration.test.ts index 9fc8e66c2..dd4a76669 100644 --- a/omnisharptest/omnisharpIntegrationTests/dotnetTest.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/dotnetTest.integration.test.ts @@ -8,7 +8,7 @@ import * as path from 'path'; import { should, expect } from 'chai'; import { activateCSharpExtension, isSlnWithCsproj } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/omnisharpTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import { EventStream } from '../../src/eventStream'; import { EventType } from '../../src/omnisharp/eventType'; import { OmnisharpRequestMessage } from '../../src/omnisharp/loggingEvents'; diff --git a/omnisharptest/omnisharpIntegrationTests/hoverProvider.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/hoverProvider.integration.test.ts index 8e502cf20..1b5273e12 100644 --- a/omnisharptest/omnisharpIntegrationTests/hoverProvider.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/hoverProvider.integration.test.ts @@ -8,7 +8,7 @@ import * as path from 'path'; import { should, expect } from 'chai'; import { activateCSharpExtension, isRazorWorkspace, isSlnWithGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/omnisharpTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; export type Test = 'a' | 'b' | ['c', any]; diff --git a/omnisharptest/omnisharpIntegrationTests/implementationProvider.test.ts b/omnisharptest/omnisharpIntegrationTests/implementationProvider.test.ts index 5c530ccca..8582905ec 100644 --- a/omnisharptest/omnisharpIntegrationTests/implementationProvider.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/implementationProvider.test.ts @@ -6,7 +6,7 @@ import * as vscode from 'vscode'; import OmniSharpImplementationProvider from '../../src/features/implementationProvider'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/omnisharpTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import { expect, should } from 'chai'; import { activateCSharpExtension, isRazorWorkspace, isSlnWithGenerator } from './integrationHelpers'; diff --git a/omnisharptest/omnisharpIntegrationTests/inlayHints.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/inlayHints.integration.test.ts index 4f82217b7..c6d0023d7 100644 --- a/omnisharptest/omnisharpIntegrationTests/inlayHints.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/inlayHints.integration.test.ts @@ -12,7 +12,7 @@ import { isSlnWithGenerator, restartOmniSharpServer, } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/omnisharpTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import * as path from 'path'; import { InlayHint, LinePositionSpanTextChange } from '../../src/omnisharp/protocol'; import { isNotNull } from '../testUtil'; diff --git a/omnisharptest/omnisharpIntegrationTests/languageMiddleware.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/languageMiddleware.integration.test.ts index 680bd98fe..b5c7204ba 100644 --- a/omnisharptest/omnisharpIntegrationTests/languageMiddleware.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/languageMiddleware.integration.test.ts @@ -5,7 +5,7 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/omnisharpTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import { expect, should } from 'chai'; import { activateCSharpExtension, isRazorWorkspace, isSlnWithGenerator } from './integrationHelpers'; import { LanguageMiddleware, LanguageMiddlewareFeature } from '../../src/omnisharp/languageMiddlewareFeature'; diff --git a/omnisharptest/omnisharpIntegrationTests/launchConfiguration.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/launchConfiguration.integration.test.ts index ad45ff408..1b8249bfa 100644 --- a/omnisharptest/omnisharpIntegrationTests/launchConfiguration.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/launchConfiguration.integration.test.ts @@ -8,7 +8,7 @@ import * as vscode from 'vscode'; import { should, expect } from 'chai'; import { activateCSharpExtension, isRazorWorkspace, isSlnWithGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/omnisharpTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import { poll } from './poll'; import { isNotNull } from '../testUtil'; diff --git a/omnisharptest/omnisharpIntegrationTests/reAnalyze.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/reAnalyze.integration.test.ts index 6864a69c9..e03541bad 100644 --- a/omnisharptest/omnisharpIntegrationTests/reAnalyze.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/reAnalyze.integration.test.ts @@ -8,7 +8,7 @@ import * as path from 'path'; import { should, expect } from 'chai'; import { activateCSharpExtension, isRazorWorkspace, isSlnWithGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/omnisharpTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import { poll, assertWithPoll } from './poll'; import { EventStream } from '../../src/eventStream'; import { EventType } from '../../src/omnisharp/eventType'; diff --git a/omnisharptest/omnisharpIntegrationTests/referenceProvider.test.ts b/omnisharptest/omnisharpIntegrationTests/referenceProvider.test.ts index c8095abb7..71bc637ea 100644 --- a/omnisharptest/omnisharpIntegrationTests/referenceProvider.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/referenceProvider.test.ts @@ -6,7 +6,7 @@ import * as vscode from 'vscode'; import OmniSharpReferenceProvider from '../../src/features/referenceProvider'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/omnisharpTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import { expect, should } from 'chai'; import { activateCSharpExtension, isRazorWorkspace, isSlnWithGenerator } from './integrationHelpers'; diff --git a/omnisharptest/omnisharpIntegrationTests/semanticTokensProvider.test.ts b/omnisharptest/omnisharpIntegrationTests/semanticTokensProvider.test.ts index b2e3af3a2..c8aabbb49 100644 --- a/omnisharptest/omnisharpIntegrationTests/semanticTokensProvider.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/semanticTokensProvider.test.ts @@ -8,7 +8,7 @@ import * as path from 'path'; import { should, assert } from 'chai'; import { activateCSharpExtension, isRazorWorkspace, isSlnWithGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/omnisharpTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; interface ExpectedToken { startLine: number; diff --git a/omnisharptest/omnisharpIntegrationTests/signatureHelp.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/signatureHelp.integration.test.ts index a4b301277..3e16d1268 100644 --- a/omnisharptest/omnisharpIntegrationTests/signatureHelp.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/signatureHelp.integration.test.ts @@ -8,7 +8,7 @@ import * as path from 'path'; import { expect, should } from 'chai'; import { activateCSharpExtension, isRazorWorkspace, isSlnWithGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/omnisharpTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; suite(`SignatureHelp: ${testAssetWorkspace.description}`, function () { let fileUri: vscode.Uri; diff --git a/omnisharptest/omnisharpIntegrationTests/sourceGeneratorDefinitionProvider.test.ts b/omnisharptest/omnisharpIntegrationTests/sourceGeneratorDefinitionProvider.test.ts index 1ce7441c6..4585c3df7 100644 --- a/omnisharptest/omnisharpIntegrationTests/sourceGeneratorDefinitionProvider.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/sourceGeneratorDefinitionProvider.test.ts @@ -9,7 +9,7 @@ import * as path from 'path'; import OmniSharpDefinitionProvider from '../../src/features/definitionProvider'; import { activateCSharpExtension, isSlnWithGenerator, restartOmniSharpServer } from './integrationHelpers'; import { assertWithPoll, sleep } from './poll'; -import testAssetWorkspace from './testAssets/omnisharpTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; suite(`${OmniSharpDefinitionProvider.name}: ${testAssetWorkspace.description}`, () => { let fileUri: vscode.Uri; diff --git a/omnisharptest/omnisharpIntegrationTests/testAssets/activeTestAssetWorkspace.ts b/omnisharptest/omnisharpIntegrationTests/testAssets/activeTestAssetWorkspace.ts new file mode 100644 index 000000000..2bf613dc0 --- /dev/null +++ b/omnisharptest/omnisharpIntegrationTests/testAssets/activeTestAssetWorkspace.ts @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as path from 'path'; +import * as vscode from 'vscode'; + +import { ITestAssetWorkspace } from '../../../test/integrationTests/testAssets/testAssets'; + +import singleCsproj from '../../../test/integrationTests/testAssets/singleCsproj'; +import slnWithCsproj from '../../../test/integrationTests/testAssets/slnWithCsproj'; +import slnFilterWithCsproj from '../../../test/integrationTests/testAssets/slnFilterWithCsproj'; +import BasicRazorApp2_1 from '../../../test/integrationTests/testAssets/basicRazorApp21'; +import slnWithGenerator from '../../../test/integrationTests/testAssets/slnWithGenerator'; +import { OmnisharpTestAssetWorkspace } from './omnisharpTestAssetWorkspace'; + +const testAssetWorkspaces: { [x: string]: ITestAssetWorkspace } = { + singleCsproj, + slnWithCsproj, + slnFilterWithCsproj, + BasicRazorApp2_1, + slnWithGenerator, +}; + +const workspaceName = vscode.workspace.workspaceFolders![0].uri.fsPath.split(path.sep).pop(); + +const activeTestAssetWorkspace = new OmnisharpTestAssetWorkspace(testAssetWorkspaces[workspaceName!]); + +export default activeTestAssetWorkspace; diff --git a/omnisharptest/omnisharpIntegrationTests/testAssets/omnisharpTestAssetWorkspace.ts b/omnisharptest/omnisharpIntegrationTests/testAssets/omnisharpTestAssetWorkspace.ts index 9d7338c49..a41fe54bf 100644 --- a/omnisharptest/omnisharpIntegrationTests/testAssets/omnisharpTestAssetWorkspace.ts +++ b/omnisharptest/omnisharpIntegrationTests/testAssets/omnisharpTestAssetWorkspace.ts @@ -3,28 +3,81 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as path from 'path'; import * as vscode from 'vscode'; +import { EventStream } from '../../../src/eventStream'; +import { EventType } from '../../../src/omnisharp/eventType'; +import { BaseEvent } from '../../../src/omnisharp/loggingEvents'; +import { poll } from '../poll'; +import { ITestAssetWorkspace, TestAssetWorkspace } from '../../../test/integrationTests/testAssets/testAssets'; +import { ActivationResult } from '../integrationHelpers'; -import { ITestAssetWorkspace } from '../../../test/integrationTests/testAssets/testAssets'; +export class OmnisharpTestAssetWorkspace extends TestAssetWorkspace { + constructor(workspace: ITestAssetWorkspace) { + super(workspace); + } -import singleCsproj from '../../../test/integrationTests/testAssets/singleCsproj'; -import slnWithCsproj from '../../../test/integrationTests/testAssets/slnWithCsproj'; -import slnFilterWithCsproj from '../../../test/integrationTests/testAssets/slnFilterWithCsproj'; -import BasicRazorApp2_1 from '../../../test/integrationTests/testAssets/basicRazorApp21'; -import slnWithGenerator from '../../../test/integrationTests/testAssets/slnWithGenerator'; -import { OmnisharpTestAssetWorkspace } from './omnisharpTestAssets'; + async restore(): Promise { + await vscode.commands.executeCommand('dotnet.restore.all'); + } -const testAssetWorkspaces: { [x: string]: ITestAssetWorkspace } = { - singleCsproj, - slnWithCsproj, - slnFilterWithCsproj, - BasicRazorApp2_1, - slnWithGenerator, -}; + async restoreAndWait(activation: ActivationResult): Promise { + await this.restore(); -const workspaceName = vscode.workspace.workspaceFolders![0].uri.fsPath.split(path.sep).pop(); + // Wait for activity to settle before proceeding + await this.waitForIdle(activation.eventStream); + } -const activeTestAssetWorkspace = new OmnisharpTestAssetWorkspace(testAssetWorkspaces[workspaceName!]); + async waitForEvent( + stream: EventStream, + captureType: EventType, + stopCondition: (e: T) => boolean = (_) => true, + timeout: number = 25 * 1000 + ): Promise { + let event: T | undefined = undefined; -export default activeTestAssetWorkspace; + const subscription = stream.subscribe((e: BaseEvent) => { + if (e.type === captureType) { + const tEvent = e; + + if (stopCondition(tEvent)) { + event = tEvent; + subscription.unsubscribe(); + } + } + }); + + await poll( + () => event, + timeout, + 500, + (e) => !!e + ); + + return event; + } + + async waitForIdle(stream: EventStream, timeout: number = 25 * 1000): Promise { + let event: BaseEvent | undefined = { type: 0 }; + + const subscription = stream.subscribe( + (e: BaseEvent) => e.type !== EventType.BackgroundDiagnosticStatus && (event = e) + ); + await poll( + () => event, + timeout, + 500, + (e) => { + if (e) { + // We're still getting real events, set the event to undefined so we can check if it changed in the next poll. + event = undefined; + return false; + } else { + // The event is still undefined (set by the last poll) which means we haven't recieved any new events - we can exit here. + return true; + } + } + ); + + subscription.unsubscribe(); + } +} diff --git a/omnisharptest/omnisharpIntegrationTests/testAssets/omnisharpTestAssets.ts b/omnisharptest/omnisharpIntegrationTests/testAssets/omnisharpTestAssets.ts deleted file mode 100644 index a41fe54bf..000000000 --- a/omnisharptest/omnisharpIntegrationTests/testAssets/omnisharpTestAssets.ts +++ /dev/null @@ -1,83 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as vscode from 'vscode'; -import { EventStream } from '../../../src/eventStream'; -import { EventType } from '../../../src/omnisharp/eventType'; -import { BaseEvent } from '../../../src/omnisharp/loggingEvents'; -import { poll } from '../poll'; -import { ITestAssetWorkspace, TestAssetWorkspace } from '../../../test/integrationTests/testAssets/testAssets'; -import { ActivationResult } from '../integrationHelpers'; - -export class OmnisharpTestAssetWorkspace extends TestAssetWorkspace { - constructor(workspace: ITestAssetWorkspace) { - super(workspace); - } - - async restore(): Promise { - await vscode.commands.executeCommand('dotnet.restore.all'); - } - - async restoreAndWait(activation: ActivationResult): Promise { - await this.restore(); - - // Wait for activity to settle before proceeding - await this.waitForIdle(activation.eventStream); - } - - async waitForEvent( - stream: EventStream, - captureType: EventType, - stopCondition: (e: T) => boolean = (_) => true, - timeout: number = 25 * 1000 - ): Promise { - let event: T | undefined = undefined; - - const subscription = stream.subscribe((e: BaseEvent) => { - if (e.type === captureType) { - const tEvent = e; - - if (stopCondition(tEvent)) { - event = tEvent; - subscription.unsubscribe(); - } - } - }); - - await poll( - () => event, - timeout, - 500, - (e) => !!e - ); - - return event; - } - - async waitForIdle(stream: EventStream, timeout: number = 25 * 1000): Promise { - let event: BaseEvent | undefined = { type: 0 }; - - const subscription = stream.subscribe( - (e: BaseEvent) => e.type !== EventType.BackgroundDiagnosticStatus && (event = e) - ); - await poll( - () => event, - timeout, - 500, - (e) => { - if (e) { - // We're still getting real events, set the event to undefined so we can check if it changed in the next poll. - event = undefined; - return false; - } else { - // The event is still undefined (set by the last poll) which means we haven't recieved any new events - we can exit here. - return true; - } - } - ); - - subscription.unsubscribe(); - } -} diff --git a/omnisharptest/omnisharpIntegrationTests/typeDefinitionProvider.test.ts b/omnisharptest/omnisharpIntegrationTests/typeDefinitionProvider.test.ts index ff3e670bc..121a67ad1 100644 --- a/omnisharptest/omnisharpIntegrationTests/typeDefinitionProvider.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/typeDefinitionProvider.test.ts @@ -6,7 +6,7 @@ import * as vscode from 'vscode'; import OmniSharpDefinitionProvider from '../../src/features/definitionProvider'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/omnisharpTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import { expect, should } from 'chai'; import { activateCSharpExtension, diff --git a/omnisharptest/omnisharpIntegrationTests/virtualDocumentTracker.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/virtualDocumentTracker.integration.test.ts index c71dcf687..64df57f10 100644 --- a/omnisharptest/omnisharpIntegrationTests/virtualDocumentTracker.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/virtualDocumentTracker.integration.test.ts @@ -7,7 +7,7 @@ import * as vscode from 'vscode'; import { expect, should } from 'chai'; import { activateCSharpExtension, isSlnWithGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/omnisharpTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import { IDisposable } from '../../src/disposable'; suite(`Virtual Document Tracking ${testAssetWorkspace.description}`, function () { diff --git a/omnisharptest/omnisharpIntegrationTests/workspaceSymbolProvider.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/workspaceSymbolProvider.integration.test.ts index 43044fd90..fd14cd18c 100644 --- a/omnisharptest/omnisharpIntegrationTests/workspaceSymbolProvider.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/workspaceSymbolProvider.integration.test.ts @@ -7,7 +7,7 @@ import * as vscode from 'vscode'; import { expect, should } from 'chai'; import { activateCSharpExtension, isRazorWorkspace, isSlnWithGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/omnisharpTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; suite(`WorkspaceSymbolProvider: ${testAssetWorkspace.description}`, function () { suiteSetup(async function () {