[Bug]: `test.concurrent.each` not executing tests concurrently
See original GitHub issueVersion
v27.3.1
Steps to reproduce
import { setTimeout } from 'timers/promises';
test.concurrent.each([1, 2, 3, 4, 5])(
'concurrency test',
async () => {
await setTimeout(1000);
expect(true).toBe(true);
},
);
PASS src/a.spec.ts (5.457 s)
✓ concurrency test (1004 ms)
✓ concurrency test (1001 ms)
✓ concurrency test (1002 ms)
✓ concurrency test (1002 ms)
✓ concurrency test (1000 ms)
Test Suites: 1 passed, 1 total
Tests: 5 passed, 5 total
Snapshots: 0 total
Time: 5.653 s, estimated 6 s
Expected behavior
I expect test run time to be around 1 second
Actual behavior
Based on the run time tests seem to be run in sync.
Additional context
No response
Environment
System:
OS: Linux 4.19 Ubuntu 20.04.3 LTS (Focal Fossa)
CPU: (16) x64 AMD Ryzen 7 4800H with Radeon Graphics
Binaries:
Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
npmPackages:
jest: ^27.3.1 => 27.3.1
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Run Nightwatch tests in parallel | Developer Guide
Test concurrency is done at the file level. Each test file will fill a test worker slot. Individual tests/steps in a test file...
Read more >JUnit 5 User Guide
With parallel execution enabled, run longer tests first: "shortest test plan execution duration" mode. Various other use cases.
Read more >Are tests inside one file run in parallel in Jest? - Stack Overflow
By the way @trusktr Jest DOES run tests in parallel, just not ones in the same file. So you can run into issues...
Read more >Run all tests in TestSuite array in parallel - MATLAB
When you select a test suite to run in parallel, consider possible resource contention. For example, if your test fixtures access global resources,...
Read more >Why executing multiple tests in parallel is a bad idea | by Colin ...
Take QA manual testing as the use case to explore. Yes, you can execute multiple test cases at the same time. It appears...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It seems to be in
jest-circus
after versionv27.0.0
.It works fine for me with
jest-jasmine2
inv27.0.0
.Can another person try this with
jest-jasmine2
, to confirm it’s only injest-circus
?With jest-jasmine:
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.