diff --git a/test/automation/src/terminal.ts b/test/automation/src/terminal.ts index 67f012bf483..d088f849520 100644 --- a/test/automation/src/terminal.ts +++ b/test/automation/src/terminal.ts @@ -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(r => setTimeout(r, 2000)) + ]); break; } }