mirror of
https://github.com/Microsoft/vscode
synced 2024-07-05 01:08:57 +00:00
smoke - restore workaround for #146785
This commit is contained in:
parent
44b6695d4e
commit
98d2ea4444
|
@ -121,7 +121,7 @@ export class Application {
|
|||
await code.waitForWindowIds(ids => ids.length > 0);
|
||||
|
||||
// We need a rendered workbench
|
||||
await measureAndLog(code.waitForElement('.monaco-workbench'), 'Application#checkWindowReady: wait for .monaco-workbench element', this.logger);
|
||||
await this.checkWorkbenchReady(code);
|
||||
|
||||
// Remote but not web: wait for a remote connection state change
|
||||
if (this.remote) {
|
||||
|
@ -140,4 +140,28 @@ export class Application {
|
|||
}, 300 /* = 30s of retry */), 'Application#checkWindowReady: wait for remote indicator', this.logger);
|
||||
}
|
||||
}
|
||||
|
||||
private async checkWorkbenchReady(code: Code): Promise<void> {
|
||||
const driver = code.driver;
|
||||
|
||||
// Web / Legacy: just poll for workbench element
|
||||
if (this.web) {
|
||||
await measureAndLog(code.waitForElement('.monaco-workbench'), 'Application#checkWindowReady: wait for .monaco-workbench element', this.logger);
|
||||
}
|
||||
|
||||
// Desktop (playwright): we see hangs, where IPC messages
|
||||
// are not delivered (https://github.com/microsoft/vscode/issues/146785)
|
||||
// Workaround is to try to reload the window when that happens
|
||||
else {
|
||||
try {
|
||||
await measureAndLog(code.waitForElement('.monaco-workbench', undefined, 100 /* 10s of retry */), 'Application#checkWindowReady: wait for .monaco-workbench element', this.logger);
|
||||
} catch (error) {
|
||||
this.logger.log(`checkWindowReady: giving up after 10s, reloading window and trying again...`);
|
||||
|
||||
await driver.reload();
|
||||
|
||||
return this.checkWorkbenchReady(code);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user