Skip to content

test: pluginのテストタイムアウト既定値を15秒にする - #661

Merged
ddryo merged 1 commit into
devfrom
test/plugin-test-timeout
Oct 1, 2026
Merged

ddryo merged 1 commit into
devfrom
test/plugin-test-timeout

Conversation

@ddryo

@ddryo ddryo commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

概要

packages/pluginのテストタイムアウト既定値を15秒にします(Vitest既定は5秒)。

背景

#660のCIで、packages/plugin/src/builder/generated-css.test.tsの1件目が5211msかかり、5秒のタイムアウトで失敗しました。同じコミットの再実行では成功しています。

このパッケージには実際にSCSSをビルドするテストが多く、CI(4 vCPU、turboは3並列)では所要時間が負荷に応じて伸びます。generated-css.test.tsの1件目の実測は次のとおりです。

実行 1件目 pluginテスト合計
9/30のPR 2569ms 60.95s
9/30のPR 3483ms 84.53s
#659 3811ms 98.46s
#660(失敗) 5211ms 103.64s

同種の処理を使うwebpack.test.ts・next.test.ts・vite.test.ts・shared.test.tsは、すでに個別に15秒を指定しています(#512 / #519)。generated-css.test.tsとcompile-entry.test.tsには指定がありませんでした。

変更内容

  • packages/plugin/vite.config.jsのtestにtestTimeout: 15000を追加

個別指定を増やす方式だと新しいテストで指定漏れが再発するため、パッケージの既定値で揃えます。既存の個別指定(15000とcli.test.tsの60_000)はそのまま残しています。

対象外

失敗した実行では、Vitestがタイムアウトを報告した後にSegmentation fault(exit 139)が出ていました。成功した再実行では出ておらず、ローカルでタイムアウトを強制しても再現しないため、原因は特定できていません。このPRはきっかけになったタイムアウトを減らすもので、この現象自体は直していません。

確認

  • packages/pluginのテストをローカルで実行し、20ファイル・227件が通過

🤖 Generated with Claude Code

https://claude.ai/code/session_0129zFC9XZZwYbJc89oLQQ1b

Summary by CodeRabbit

  • テスト
    • テストのタイムアウトを15秒に設定しました。

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 5e5263d3-0e9e-4049-ae24-9412cf35b594

📥 Commits

Reviewing files that changed from the base of the PR and between c395cf7 and 73666a1.

📒 Files selected for processing (1)
  • packages/plugin/vite.config.js

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.


📝 Walkthrough

Walkthrough

テスト設定に testTimeout: 15000 を追加しました。これにより、テストのタイムアウト値は15秒になります。

Changes

テストタイムアウト設定

Layer / File(s) Summary
テストのタイムアウト値を設定
packages/plugin/vite.config.js
テスト設定に testTimeout: 15000 を追加しました。

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 73666

The timeout setting reaches the plugin’s test command and addresses the reported slow-test timeout. No concrete issue in this change requires delaying the merge.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed タイトルは、packages/plugin のテストタイムアウト既定値を15秒に変更する主な内容を正確かつ簡潔に示しています。
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.

Warning

Some tools did not complete. Review the errors below.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

うさぎは設定を見つけたよ
十五秒の時を添えたよ
テストがゆっくり走っても
砂時計はまだ落ち着いてる
変更を祝って跳ねていこう

Comment @coderabbitai help to get the list of available commands.

@ddryo
ddryo merged commit d815b72 into dev Oct 1, 2026
7 checks passed
@ddryo
ddryo deleted the test/plugin-test-timeout branch October 1, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant