smoke test tweaks

- remove timeout on shutdown
- log exactly where time is spend on shutdown (web)
- stop spawning code when terminated
This commit is contained in:
Benjamin Pasero
2021-12-02 07:34:13 +01:00
parent 68a1e2f872
commit 9d427e4df4
3 changed files with 21 additions and 6 deletions

View File

@@ -29,7 +29,15 @@ export interface SpawnOptions {
browser?: 'chromium' | 'webkit' | 'firefox';
}
let stopped = false;
process.on('exit', () => stopped = true);
process.on('SIGINT', () => stopped = true);
process.on('SIGTERM', () => stopped = true);
export async function spawn(options: SpawnOptions): Promise<Code> {
if (stopped) {
throw new Error('Smoke test process has terminated, refusing to spawn Code');
}
await copyExtension(repoPath, options.extensionsPath, 'vscode-notebook-tests');