Skip to content

Commit 75eb800

Browse files
committed
Revert diagnostic integration test changes other than generator skips.
1 parent 91eaa91 commit 75eb800

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

test/integrationTests/diagnostics.integration.test.ts

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ suite(`DiagnosticProvider: ${testAssetWorkspace.description}`, function () {
3333
this.skip();
3434
}
3535

36-
const activation = await activateCSharpExtension();
37-
await testAssetWorkspace.restoreAndWait(activation);
36+
await activateCSharpExtension();
37+
await testAssetWorkspace.restore();
3838

3939
let fileName = 'diagnostics.cs';
4040
let secondaryFileName = 'secondaryDiagnostics.cs';
@@ -55,6 +55,8 @@ suite(`DiagnosticProvider: ${testAssetWorkspace.description}`, function () {
5555
this.skip();
5656
}
5757

58+
await activateCSharpExtension();
59+
await testAssetWorkspace.restore();
5860
await vscode.commands.executeCommand("vscode.open", razorFileUri);
5961
});
6062

@@ -86,17 +88,19 @@ suite(`DiagnosticProvider: ${testAssetWorkspace.description}`, function () {
8688
should();
8789

8890
// These tests don't run on the BasicRazorApp2_1 solution
89-
if (isRazorWorkspace(vscode.workspace)) {
91+
if (isRazorWorkspace(vscode.workspace) || isSlnWithGenerator(vscode.workspace)) {
9092
this.skip();
9193
}
9294

95+
await activateCSharpExtension();
96+
await testAssetWorkspace.restore();
9397
await vscode.commands.executeCommand("vscode.open", fileUri);
9498
});
9599

96100
test("Returns any diagnostics from file", async function () {
97101
await assertWithPoll(
98102
() => vscode.languages.getDiagnostics(fileUri),
99-
/*duration*/ 15 * 1000,
103+
/*duration*/ 10 * 1000,
100104
/*step*/ 500,
101105
res => expect(res.length).to.be.greaterThan(0));
102106
});
@@ -151,26 +155,21 @@ suite(`DiagnosticProvider: ${testAssetWorkspace.description}`, function () {
151155
should();
152156

153157
// These tests don't run on the BasicRazorApp2_1 solution
154-
if (isRazorWorkspace(vscode.workspace)) {
158+
if (isRazorWorkspace(vscode.workspace) || isSlnWithGenerator(vscode.workspace)) {
155159
this.skip();
156160
}
157161

158162
await setDiagnosticWorkspaceLimit(1);
163+
await testAssetWorkspace.restore();
164+
await activateCSharpExtension();
159165
await restartOmniSharpServer();
160-
const activation = await activateCSharpExtension();
161-
await testAssetWorkspace.restoreAndWait(activation);
162166
});
163167

164168
test("When workspace is count as 'large', then only show/fetch diagnostics from open documents", async function () {
165169
// We are not opening the secondary file so there should be no diagnostics reported for it.
166170
await vscode.commands.executeCommand("vscode.open", fileUri);
167171

168-
await assertWithPoll(
169-
() =>
170-
vscode.languages.getDiagnostics(fileUri),
171-
10 * 1000, 500,
172-
openFileDiag =>
173-
expect(openFileDiag.length).to.be.greaterThan(0));
172+
await assertWithPoll(() => vscode.languages.getDiagnostics(fileUri), 10 * 1000, 500, openFileDiag => expect(openFileDiag.length).to.be.greaterThan(0));
174173
await assertWithPoll(() => vscode.languages.getDiagnostics(secondaryFileUri), 10 * 1000, 500, secondaryDiag => expect(secondaryDiag.length).to.be.eq(0));
175174
});
176175

0 commit comments

Comments
 (0)