Skip to content

Commit

Permalink
test/integration/goTest.run: increase discover&run timeout
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
hyangah committed Jul 21, 2022
1 parent ffae001 commit 1adebbb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/integration/goTest.run.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ suite('Go Test Runner', () => {
});

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

0 comments on commit 1adebbb

Please sign in to comment.