run-workers --by pool: failing Before after auth `loginAs()` hangs the worker; remaining tests never run
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, node.js, playwright
- Lĩnh vực
- testing
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- JavaScript
- Star
- 4.2k
- Fork
- 754
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 28
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của codeceptjs/CodeceptJS
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
codeceptjs/CodeceptJS#5773 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`I.waitForFile` (FileSystem helper) fails if directory does not exist (yet)Có thể đã có người làm @danielrentz đã nhận 278 ngày trước. Đang mởstale
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
codeceptjs/CodeceptJS#5420 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
stale
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
codeceptjs/CodeceptJS#4958 · 10 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
stale
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
codeceptjs/CodeceptJS#4778 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 12/100
codeceptjs/CodeceptJS#5783 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của codeceptjs/CodeceptJS
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
riverqueue/river#1576 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue help wanted
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
modrollstudio/Modroll-Studio-Website#80 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add tests for CSV email parsingĐang mởgood first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
mafzalkalwardev/mailforge#21 ·
-
good first issue help wanted
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100