codeceptjs / codeceptjs/CodeceptJS

Parallel "--by pool" not working, hanging and spamming startup banner

未關閉
#5,503 1 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
stale
主要語言
JavaScript
星號
4.2k
分支
757
平均合併
2 天 9 小時
30 天內合併 PR
16

描述

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:

1. 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.

2. 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"
...

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。