提交 784f9d12 编写于 作者: J Joao Moreno

what did I do to deserve this

#34988
上级 5ddebd0b
......@@ -12,7 +12,7 @@ import * as tmp from 'tmp';
import * as rimraf from 'rimraf';
import * as mkdirp from 'mkdirp';
const tmpDir = tmp.dirSync() as { name: string; removeCallback: Function; };
const tmpDir = tmp.dirSync({ prefix: 't' }) as { name: string; removeCallback: Function; };
const testDataPath = tmpDir.name;
process.once('exit', () => rimraf.sync(testDataPath));
......@@ -76,7 +76,7 @@ if (!fs.existsSync(testCodePath)) {
fail(`Can't find Code at ${testCodePath}.`);
}
process.env.VSCODE_USER_DIR = path.join(testDataPath, 'user-dir');
process.env.VSCODE_USER_DIR = path.join(testDataPath, 'd');
process.env.VSCODE_EXTENSIONS_DIR = extensionsPath;
process.env.SMOKETEST_REPO = testRepoLocalDir;
process.env.VSCODE_WORKSPACE_PATH = workspacePath;
......
......@@ -45,6 +45,8 @@ export async function findFreePort(): Promise<number> {
*/
export class SpectronApplication {
private static count = 0;
private _client: SpectronClient;
private _workbench: Workbench;
private _screenCapturer: ScreenCapturer;
......@@ -133,7 +135,7 @@ export class SpectronApplication {
args.push(...codeArgs);
chromeDriverArgs.push(`--user-data-dir=${path.join(this._userDir, new Date().getTime().toString())}`);
chromeDriverArgs.push(`--user-data-dir=${path.join(this._userDir, String(SpectronApplication.count++))}`);
// Spectron always uses the same port number for the chrome driver
// and it handles gracefully when two instances use the same port number
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册