Skip to content

Commit 9013d58

Browse files
Merge pull request PowerShell#3606 from PowerShell/andschwa/test-timeouts
Update test timeouts and `.gitignore`
2 parents 40d4fe4 + d6926f8 commit 9013d58

File tree

5 files changed

+13
-20
lines changed

5 files changed

+13
-20
lines changed

.gitignore

+8-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
1-
bin/
2-
examples/Release/
3-
examples/Tests/foo*.txt
4-
out/
5-
node_modules/
1+
.vscode-test/
62
logs/
7-
modules/*
8-
sessions/*
9-
!modules/README.md
10-
vscode-powershell.zip
11-
vscps-preview.zip
3+
modules/
4+
node_modules/
5+
out/
6+
sessions/
7+
test/.vscode/
8+
9+
test-results.xml
1210
*.vsix
13-
npm-debug.log
14-
.vscode-test/
1511
*.DS_Store
16-
test-results.xml
17-
test/.vscode/settings.json

test/features/ExternalApi.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,5 @@ suite("ExternalApi feature - Other APIs", () => {
9494
assert.notStrictEqual(versionDetails.version, null);
9595

9696
// Start up can take some time...so set the timeout to 30 seconds.
97-
}).timeout(30000);
97+
});
9898
});

test/features/ISECompatibility.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ suite("ISECompatibility feature", () => {
4343
const currently = vscode.workspace.getConfiguration(iseSetting.path).get(iseSetting.name);
4444
assert.notStrictEqual(currently, iseSetting.value);
4545
}
46-
}).timeout(10000);
46+
});
4747

4848
test("It doesn't change theme when disabled if theme was manually changed after being enabled", async () => {
4949
assert.strictEqual(vscode.workspace.getConfiguration("workbench").get("colorTheme"), "PowerShell ISE");
@@ -58,5 +58,5 @@ suite("ISECompatibility feature", () => {
5858
assert.notStrictEqual(currently, iseSetting.value);
5959
}
6060
assert.strictEqual(vscode.workspace.getConfiguration("workbench").get("colorTheme"), "Monokai");
61-
}).timeout(10000);
61+
});
6262
});

test/features/RunCode.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ suite("RunCode tests", () => {
5656
// it to run, and then kill it for safety's sake.
5757
assert(await vscode.commands.executeCommand("PowerShell.RunPesterTestsFromFile"));
5858
assert(vscode.debug.activeDebugSession !== undefined);
59-
await sleep(5000);
6059
await vscode.debug.stopDebugging();
61-
}).timeout(30000);
60+
});
6261
});

test/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function run(): Promise<void> {
1414
ui: "tdd",
1515
color: !process.env.TF_BUILD, // colored output from test results
1616
reporter: "mocha-multi-reporters",
17-
timeout: 5000,
17+
timeout: 30000, // 30s because PowerShell startup is slow!
1818
reporterOptions: {
1919
// NOTE: The XML output by Mocha's xUnit reporter is actually in the
2020
// JUnit style. I'm unsure how no one else has noticed this.

0 commit comments

Comments
 (0)