Browse Source

test: increase timeout for spellchecker (#28427)

Cheng Zhao 4 years ago
parent
commit
ff96fabe5e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      spec-main/spellchecker-spec.ts

+ 2 - 2
spec-main/spellchecker-spec.ts

@@ -13,7 +13,7 @@ const features = process._linkedBinding('electron_common_features');
 const v8Util = process._linkedBinding('electron_common_v8_util');
 
 ifdescribe(features.isBuiltinSpellCheckerEnabled())('spellchecker', function () {
-  this.timeout((process.env.IS_ASAN ? 100 : 20) * 1000);
+  this.timeout((process.env.IS_ASAN ? 200 : 20) * 1000);
 
   let w: BrowserWindow;
 
@@ -33,7 +33,7 @@ ifdescribe(features.isBuiltinSpellCheckerEnabled())('spellchecker', function ()
   // to detect spellchecker is to keep checking with a busy loop.
   async function rightClickUntil (fn: (params: Electron.ContextMenuParams) => boolean) {
     const now = Date.now();
-    const timeout = 10 * 1000;
+    const timeout = (process.env.IS_ASAN ? 180 : 10) * 1000;
     let contextMenuParams = await rightClick();
     while (!fn(contextMenuParams) && (Date.now() - now < timeout)) {
       await delay(100);