fix: electron e2e の launch fixture teardown timeout を 60s に拡大する#247
Merged
Conversation
PR #245 の初回 CI で flaky fail した `structured-error.electron.spec.ts` の `Tearing down "launch" exceeded the test timeout of 30000ms.` を救済する。 `launch` fixture は明示的な timeout を持たなかったため test timeout (default 30s) と共有していた。`{ timeout: 60_000 }` を Playwright の 配列形式で明示し、teardown 単独に 60s の余裕を持たせる (test 本体の timeout は default 30s のまま据え置きで、本体 hang の検出は従来通り維持)。 Closes #246
/simplify レビューを適用: - 5 行コメントを 2 行に圧縮 (Playwright 仕様解説は公式 doc 任せ) - teardown の sequential `for...of + await app.close()` を `Promise.all` 化。再 launch test で teardown が直列で線形に 伸びるのを抑制し、今回の timeout 拡張動機 (teardown 余裕確保) と整合
ymnao
added a commit
that referenced
this pull request
Jul 5, 2026
- package.json の version を 0.6.0 → 0.7.0 に bump - CHANGELOG.md に v0.7.0 エントリを追加 (#243 〜 #280) - Fixed: FileTree scroll regression (#276)、electron e2e launch teardown timeout 拡大 (#247) - Internal: #209 3 項目 (drift-lock 系 refactor #278/#279/#280)、settings setter 集約 (#273 → #277)、search/workspace/backlink 系 helper 抽出 15 件 - Dependencies: electron 43.0.0 / p-limit 7.3.0 major bump (#275)、Dependabot 7 件 combine (#274)、pnpm-workspace.yaml overrides で @codemirror dual copy を恒久防止 Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
PR #245 の初回 CI で flaky fail した
e2e/electron/structured-error.electron.spec.ts:24:6のTearing down "launch" exceeded the test timeout of 30000ms.を救済する。launchfixture に{ timeout: 60_000 }を明示し、teardown 単独で 60s の余裕を持たせる (test 本体の timeout は default 30s のまま据え置き)。関連 Issue
Closes #246
移行 Stage
該当なし (e2e test infra の hardening、強いて言えば Stage 6: 仕上げ枠)。
変更内容
launchfixture を Playwright の配列形式[fn, options]に書き換え、{ timeout: 60_000 }を明示app.close()は 1〜2s で完了するので副作用は実質なし、稀に xvfb 上で 30s 超となるケース (本回 flaky) を救済採用案 (Option A) と見送り根拠
Issue #246 で挙げた 5 候補のうち Option A を採用:
launchfixture に{ timeout: 60_000 }明示launchfixture で集約管理しているので個別 spec での処理は二重管理になる)_electron.launchのargsに flag 追加playwright.electron.config.tsのretriesを 1 → 2retries: 1で救済できなかったので effect 弱い)app.close()をPromise.race+ force-kill再発時の段階的エスカレーション (記録)
Option A で flaky が再発した場合の次の手:
retries: 1 → 2) で救済app.close()へのPromise.race+ force-kill) で hang を hard cuterror-context.md/ trace.zip) を retain して具体 stack を観測 → root cause 調査動作確認
pnpm typecheckpass (renderer / main / preload)pnpm typecheck:e2epass (Playwright 配列形式 fixture の型 OK)pnpm lint(biome) pass、本 file の既存noEmptyPatternoverride に影響なしpnpm test(unit) 2230 件 pass + 2 件 skippnpm test:e2e:electronローカル sandbox EPERM で動かない (HANDOFF 既知) → CI のelectron-e2ejob が pass することで検証するスクリーンショット
該当なし (test infra の変更)