You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the test locally on a non-cached instance of VS Code works the first time, but fails if it has been cached.
Note:
It looks like runTests is making a "copy" of the download in $(PWD)/.vscode-test even though I have already downloaded it to a shorter path.
Sample code:
// try and have a short path to prevent socket errors.constcachePath=path.join(extensionDevelopmentPath,cacheDirName);constvscodeExecutablePath=awaitdownloadAndUnzipVSCode({ cachePath });constoptions={ vscodeExecutablePath, extensionDevelopmentPath, extensionTestsPath, launchArgs };// Note: `.vscode-test` does NOT existconsole.error('dir before: %o',awaitfs.readdir('.'));awaitrunTests(options);// Note: `.vscode-test` does NOW existconsole.error('dir after: %o',awaitfs.readdir('.'));
In my case:
extensionDevelopmentPath is /Users/jason/projects/vscode-spell-checker
Integration tests are run from: /Users/jason/projects/vscode-spell-checker/packages/_integrationTests
Error Log:
Found existing install in /Users/jason/projects/vscode-spell-checker/packages/_integrationTests/.vscode-test/vscode-darwin-1.82.0. Skipping download
WARNING: IPC handle "/Users/jason/projects/vscode-spell-checker/packages/_integrationTests/.vscode-test/user-data/1.82-main.sock" is longer than 103 chars, try a shorter --user-data-dir
[main 2023-09-08T09:20:14.043Z] Could not delete obsolete instance handle Error: ENOENT: no such file or directory, unlink '/Users/jason/projects/vscode-spell-checker/packages/_integrationTests/.vscode-test/user-data/1.82-main.sock'
at unlinkSync (node:original-fs:1829:3)
at Ee.e (/Users/jason/projects/vscode-spell-checker/packages/_integrationTests/.vscode-test/vscode-darwin-1.82.0/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:91:3946)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /Users/jason/projects/vscode-spell-checker/packages/_integrationTests/.vscode-test/vscode-darwin-1.82.0/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:91:1222
at async Ee.a (/Users/jason/projects/vscode-spell-checker/packages/_integrationTests/.vscode-test/vscode-darwin-1.82.0/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:91:1108) {
errno: -2,
syscall: 'unlink',
code: 'ENOENT',
path: '/Users/jason/projects/vscode-spell-checker/packages/_integrationTests/.vscode-test/user-data/1.82-main.sock'
}
[main 2023-09-08T09:20:14.045Z] Error: ENOENT: no such file or directory, unlink '/Users/jason/projects/vscode-spell-checker/packages/_integrationTests/.vscode-test/user-data/1.82-main.sock'
at unlinkSync (node:original-fs:1829:3)
at Ee.e (/Users/jason/projects/vscode-spell-checker/packages/_integrationTests/.vscode-test/vscode-darwin-1.82.0/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:91:3946)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /Users/jason/projects/vscode-spell-checker/packages/_integrationTests/.vscode-test/vscode-darwin-1.82.0/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:91:1222
at async Ee.a (/Users/jason/projects/vscode-spell-checker/packages/_integrationTests/.vscode-test/vscode-darwin-1.82.0/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:91:1108)
Exit code: 1
Failed
Failed to run tests
Running the test locally on a non-cached instance of VS Code works the first time, but fails if it has been cached.
Note:
It looks like
runTests
is making a "copy" of the download in$(PWD)/.vscode-test
even though I have already downloaded it to a shorter path.Sample code:
In my case:
extensionDevelopmentPath
is/Users/jason/projects/vscode-spell-checker
/Users/jason/projects/vscode-spell-checker/packages/_integrationTests
Error Log:
About VS Code
Workaround
The workaround is to delete
$(PWD)/.vscode-test
before running the tests:Related Issues
The text was updated successfully, but these errors were encountered: