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

オープン
#5,503 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
javascript, node.js
領域
testing-qa

調査の方向性

リンク先のドキュメントで説明されている動的なテストプーリングモードから始め、_finishRun() 周辺の worker のライフサイクルを追跡してください。Puppeteer でハングを再現し、worker が正常に終了すること、また起動バナーがテスト割り当てごとではなく一度だけ出力されることを確認してください。

索引モデルが issue の本文から書いたものです。

説明

stale

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.

  1. 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"
...
主要言語
JavaScript
スター
4.2k
フォーク
756
平均マージ
2日 9時間
マージ済み PR(30日)
16

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

codeceptjs/CodeceptJS のほかの issue

codeceptjs/CodeceptJS の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。