hbenl / vscode-jasmine-test-adapter

Jasmine Test Adapter for the VS Code Test Explorer
MIT License
20 stars 20 forks source link

Windows: running a large number of tests does nothing (all remain pending) #58

Closed danmana closed 2 years ago

danmana commented 2 years ago

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.

hbenl commented 2 years ago

Fixed in version 1.8.0.