mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 20:13:32 +01:00
@@ -93,7 +93,14 @@ export class Terminal {
|
||||
await this._waitForTerminal(expectedLocation === 'editor' || commandId === TerminalCommandId.CreateNewEditor ? 'editor' : 'panel');
|
||||
break;
|
||||
case TerminalCommandId.KillAll:
|
||||
await this.code.waitForElements(Selector.Xterm, true, e => e.length === 0);
|
||||
// HACK: Attempt to kill all terminals to clean things up, this is known to be flaky
|
||||
// but the reason why isn't known. This is typically called in the after each hook,
|
||||
// Since it's not actually required that all terminals are killed just continue on
|
||||
// after 2 seconds.
|
||||
await Promise.race([
|
||||
this.code.waitForElements(Selector.Xterm, true, e => e.length === 0),
|
||||
new Promise<void>(r => setTimeout(r, 2000))
|
||||
]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user