If I have a large project with hundreds of tests, clicking on the Run all button does not run the tests.
The status of all tests is set to pending but the runTests worker thread never starts, so it gets stuck in this pending state.
The same happens if I select just half of the tests and run them.
However, running a few tests at a time works.
After debugging a bit, it turns out that child_process.fork does not start a process when one of the args is very large - in our case, it contains a JSON.stringify(allTestNames) (googling a bit shows the limit at 8191 chars?!)
I made a new PR to fix this by sending the list of tests as a subprocess message, which is not limited.
With the new change, I can run all 400+ tests on Windows.
If I have a large project with hundreds of tests, clicking on the
Run all
button does not run the tests. The status of all tests is set topending
but therunTests
worker thread never starts, so it gets stuck in this pending state.The same happens if I select just half of the tests and run them. However, running a few tests at a time works.
After debugging a bit, it turns out that
child_process.fork
does not start a process when one of the args is very large - in our case, it contains aJSON.stringify(allTestNames)
(googling a bit shows the limit at 8191 chars?!)I made a new PR to fix this by sending the list of tests as a subprocess message, which is not limited. With the new change, I can run all 400+ tests on Windows.