Skip to content

Commit 1adebbb

Browse files
committed
test/integration/goTest.run: increase discover&run timeout
This test actually runs go test commands multiple times (invoking src/testUtils.ts goTest()). On some slow machines (windows, mini pc) this test suite fails to complete within 4sec Note: as more tests are added here, we will need to increase the timeout accordingly. Change-Id: If09293a41e74f74419223e71dfeb4e7781c4198a Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/418544 Reviewed-by: Suzy Mueller <[email protected]> Reviewed-by: Hyang-Ah Hana Kim <[email protected]> Run-TryBot: Hyang-Ah Hana Kim <[email protected]>
1 parent ffae001 commit 1adebbb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/integration/goTest.run.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ suite('Go Test Runner', () => {
118118
});
119119

120120
suite('Subtest', () => {
121+
// WARNING: each call to testExplorer.runner.run triggers one or more
122+
// `go test` command runs (testUtils.goTest is spied, not mocked or replaced).
123+
// Each `go test` command invocation can take seconds on slow machines.
124+
// As we add more cases, the timeout should be increased accordingly.
121125
const sandbox = sinon.createSandbox();
122126
const subTestDir = path.join(fixtureDir, 'subTest');
123127
const ctx = MockExtensionContext.new();
@@ -214,6 +218,6 @@ suite('Go Test Runner', () => {
214218
'Failed to execute `go test`'
215219
);
216220
assert.strictEqual(spy.callCount, 0, 'expected no calls to goTest');
217-
}).timeout(4000);
221+
}).timeout(10000);
218222
});
219223
});

0 commit comments

Comments
 (0)