run-workers --by pool: failing Before after auth `loginAs()` hangs the worker; remaining tests never run
メンテナーはふだん 2 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- javascript, node.js, playwright
- 領域
- testing
調査の方向性
Start by comparing codeceptjs run-workers 1 --by pool with the plain codeceptjs run using the supplied 12-suite reproduction, then inspect the worker and pool execution paths implicated by the difference. Reproduce the unhandled promise rejection after loginAs() in Before and trace why it multiplies. Done when the worker completes the remaining suites and reports their results without the rejection cycle; linked pull request #5771 is already open.
索引モデルが issue の本文から書いたものです。
説明
With run-workers --by pool, if a Before that calls loginAs() (auth plugin) fails after the login, the worker starts throwing UNHANDLED REJECTION: Chaining cycle detected for promise. The count grows with every such failure until the worker hangs or runs out of memory. Tests left in the pool never run, and the summary says OK | 0 passed. Plain codeceptjs run with the same tests works fine.
CodeceptJS 4.2.0 and 4.2.2, Node 22, Playwright.
Repro
codecept.conf.js:
export const config = {
tests: './tests/*.test.js',
output: './output',
helpers: { Playwright: { url: 'http://127.0.0.1:8765', show: false } },
plugins: {
auth: {
enabled: true,
inject: 'loginAs',
users: {
user: {
login: I => {
I.amOnPage('/')
I.setCookie({ name: 'session', value: '1', domain: '127.0.0.1', path: '/' })
},
check: I => I.amOnPage('/'),
},
},
},
},
}
tests/suite_01.test.js … suite_12.test.js (12 copies):
Feature('Suite 01')
let calls = 0
Before(async ({ I, loginAs }) => {
calls++
loginAs('user')
I.amOnPage('/')
if (calls >= 2) I.waitForElement('#missing', 1)
await I.grabCurrentUrl()
})
Scenario('test 1', ({ I }) => I.amOnPage('/'))
Scenario('test 2', ({ I }) => I.amOnPage('/'))
python3 -m http.server 8765 --bind 127.0.0.1
npx codeceptjs run-workers 1 --by pool
Result
- Rejections per suite: 1, 2, 5, 16, 65, 326, 1957, 13700, 109601, 986410, then
JS heap out of memory. Suites 11–12 never run. codeceptjs run: no rejections, all 12 suites run.loginAs()moved fromBeforeinto the Scenarios: no rejections.
Related: #5207.
- 主要言語
- JavaScript
- スター
- 4.2k
- フォーク
- 754
- 平均マージ
- 2日 6時間
- マージ済み PR(30日)
- 33
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
codeceptjs/CodeceptJS のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
codeceptjs/CodeceptJS#5773 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
`I.waitForFile` (FileSystem helper) fails if directory does not exist (yet)対応中かも @danielrentz が 275 日前に担当しました。 オープンstale
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
codeceptjs/CodeceptJS#5420 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
stale
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
codeceptjs/CodeceptJS#4958 · コメント 10 件 · リアクション 2 件 ·
メンテナーはふだん 2 日以内に返信
-
stale
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
codeceptjs/CodeceptJS#4778 · コメント 3 件 ·
メンテナーはふだん 2 日以内に返信
-
Scenario Steps report wrong line/column for TypeScript include modules対応中かも @kobenguyent が今日担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
codeceptjs/CodeceptJS#5772 · リアクション 1 件 · 担当者 2 名 ·
メンテナーはふだん 2 日以内に返信
codeceptjs/CodeceptJS の issue をすべて見る
似ている issue
-
[metro-file-map] An error a watcher backend reports ends the server, since nothing listens for itオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
post-merge-followup
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
code-yeongyu/senpi#5262 ·
メンテナーはふだん 1 日以内に返信
-
status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
mastra-ai/mastra#29108 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
fix(scripts): UnicodeEncodeError in test_run_training_pipeline on non-UTF-8 default encoding environments対応中かも @hardikkaurani が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信