mirror of
https://github.com/Microsoft/vscode
synced 2024-10-05 19:02:54 +00:00
parent
0cf530cd3c
commit
d2f3f7555b
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue