Parallel "--by pool" not working, hanging and spamming startup banner
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- javascript, node.js
- Domain
- testing-qa
Research direction
Start with the dynamic test-pooling mode described in the linked documentation and trace the worker lifecycle around _finishRun(). Reproduce the hang with Puppeteer and verify that workers exit cleanly and the startup banner is emitted only once rather than for every test assignment.
Written by the indexing model from the issue text.
Description
We have historically suffered from idle workers due to the wide range of test duration, so when I saw the --by pool mode I thought we'd be able to speed up our tests for free basically ;) (ref: https://codecept.io/parallel/#dynamic-test-pooling-mode)
But it seems to not be working as expected. A couple of issues I noticed:
- When I run with pool mode it seems to just hang after a certain amount of time without any clear reason why.
We're using Puppeteer, and my suspicion is that the browser's WebSocket connection keeps the Node event loop alive in the worker thread after the port is closed, so the parent never sees the worker exit and _finishRun() never gets called.
- Also, the startup message is fired every time a worker takes a test, so the output gets absolutely hammered which is not ideal for CI
e.g. (example output)
CodeceptJS v3.7.7 #StandWithUkraine
Running tests in 1 workers...
CodeceptJS v3.7.7 #StandWithUkraine
Using test root "/home/user/project"
Login suite --
[Worker 01] ✔ Login suite › User can log in in 3401ms
✔ User can log in in 3401ms
OK | 1 passed // 4s
CodeceptJS v3.7.7 #StandWithUkraine
Using test root "/home/user/project"
Login suite --
[Worker 01] ✔ Login suite › User sees error on bad credentials in 2980ms
✔ User sees error on bad credentials in 2980ms
OK | 2 passed // 8s
CodeceptJS v3.7.7 #StandWithUkraine
Using test root "/home/user/project"
...
- Dominant language
- JavaScript
- Stars
- 4.2k
- Forks
- 756
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 16
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from codeceptjs/CodeceptJS
-
stale
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
codeceptjs/CodeceptJS#5420 · 1 comment ·
-
stale
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
codeceptjs/CodeceptJS#5358 · 1 comment ·
-
stale
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
codeceptjs/CodeceptJS#4958 · 10 comments · 2 reactions ·
-
stale
Difficulty 1/5 Under an hour Newbie friendliness 72/100
codeceptjs/CodeceptJS#4778 · 3 comments ·
-
stale
Difficulty 4/5 3-5 days Newbie friendliness 38/100
codeceptjs/CodeceptJS#5618 · 1 comment ·
All issues in codeceptjs/CodeceptJS
Similar issues
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
open-webui/open-webui#30750 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Mend: dependency security vulnerability untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 70/100