From db7059eb0a24910d673050395f9c099d98a465cd Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 22 Mar 2021 10:56:08 +0900 Subject: [PATCH] test: spellchecker may take several minutes to load under ASan (#28230) * test: spellchecker may take several minutes to load under ASan * Add TODO for the timeout --- spec-main/spellchecker-spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spec-main/spellchecker-spec.ts b/spec-main/spellchecker-spec.ts index 31443d6a4a..d8f5c6ccb2 100644 --- a/spec-main/spellchecker-spec.ts +++ b/spec-main/spellchecker-spec.ts @@ -10,7 +10,9 @@ const features = process._linkedBinding('electron_common_features'); const v8Util = process._linkedBinding('electron_common_v8_util'); ifdescribe(features.isBuiltinSpellCheckerEnabled())('spellchecker', function () { - this.timeout(200 * 1000); + // TODO(zcbenz): Spellchecker loads really slow on ASan, we should provide + // a small testing dictionary to make the tests load faster. + this.timeout((process.env.IS_ASAN ? 700 : 20) * 1000); let w: BrowserWindow; @@ -30,7 +32,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 = (process.env.IS_ASAN ? 180 : 10) * 1000; + const timeout = (process.env.IS_ASAN ? 600 : 10) * 1000; let contextMenuParams = await rightClick(); while (!fn(contextMenuParams) && (Date.now() - now < timeout)) { await delay(100);