Skip to content

Commit f414011

Browse files
committed
test: increase timeout and skip gopls update check in testing
installation tests require multiple fs operations, and 2s may be too short to complete everything on time. Allow more time. And disable the gopls update check in gopls testing. That shortens the time to bring up the gopls server. Also remove the hack to start the test with a clean user profile (--user-data-dir). That doesn't seem to work but interferes with picking up the workspace settings, which I do not understand why. Updates golang/vscode-go#169 Updates golang/vscode-go#43 Updates microsoft/vscode#97995 Change-Id: I5dbb33514a25a2071bf5bdf4ad248087e7e9b322
1 parent ede2b2e commit f414011

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.vscode/launch.json

-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
"--disable-extensions",
6565
"--extensionDevelopmentPath=${workspaceFolder}",
6666
"--extensionTestsPath=${workspaceFolder}/out/test/gopls/index",
67-
"--user-data-dir", "${workspaceFolder}/test/gopls/testfixtures/src/workspace",
6867
"--timeout", "999999",
6968
"${workspaceFolder}/test/gopls/testfixtures/src/workspace" // gopls requires a workspace to work with.
7069
],
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"go.useLanguageServer": true,
3-
"go.languageServerFlags": ["-rpc.trace", "serve"]
3+
"go.languageServerFlags": ["-rpc.trace", "serve"],
4+
"go.useGoProxyToCheckForToolUpdates": false,
45
}

test/integration/install.test.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ import { installTools } from '../../src/goInstallTools';
1616
import { getTool, getToolAtVersion } from '../../src/goTools';
1717
import { getBinPath, getGoVersion, rmdirRecursive } from '../../src/util';
1818

19-
suite('Installation Tests', () => {
19+
suite('Installation Tests', function () {
20+
this.timeout(10000);
21+
2022
test('install tools', async () => {
2123
const goVersion = await getGoVersion();
2224
const testCases: string[][] = [
@@ -33,6 +35,7 @@ suite('Installation Tests', () => {
3335

3436
const sandbox = sinon.createSandbox();
3537
const utils = require('../../src/util');
38+
3639
const toolsGopathStub = sandbox.stub(utils, 'getToolsGopath').returns(tmpToolsGopath);
3740
const goConfig = Object.create(vscode.workspace.getConfiguration('go'), {
3841
toolsEnvVars: {

0 commit comments

Comments
 (0)