smoke - try to mitigate hanging close (#146803)

This commit is contained in:
Benjamin Pasero 2022-04-07 17:48:59 +02:00
parent 3a90a6a46d
commit 80c13ff14f
No known key found for this signature in database
GPG key ID: E6380CC4C8219E65

View file

@ -100,7 +100,10 @@ export class PlaywrightDriver implements IDriver {
// Playwright shutdown
try {
await measureAndLog(this.application.close(), 'playwright.close()', this.options.logger);
await Promise.race([
measureAndLog(this.application.close(), 'playwright.close()', this.options.logger),
new Promise<void>(resolve => setTimeout(() => resolve(), 10000)) // TODO@bpasero mitigate https://github.com/microsoft/vscode/issues/146803
]);
} catch (error) {
this.options.logger.log(`Error closing appliction (${error})`);
}