-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: The transformer tests are not run in parallel #251
Comments
This probably got to do with transform being sync. The implementation needs to be made async. Refs: facebook/jscodeshift#210 |
The issue appears to be with codemod setup. The following test code runs in parallel import { setTimeout } from "timers/promises";
describe("test", () => {
test.concurrent.each([1, 2, 3, 4, 5])("concurrency test", async () => {
await setTimeout(1000);
expect(true).toBe(true);
});
}); $ yarn jest --version
29.3.1
$ yarn why ts-jest
└─ jest-concurrent-each-test@workspace:.
└─ ts-jest@npm:29.0.3 [26b7a] (via npm:^29.0.3 [26b7a])
$ yarn jest test.spec.ts
PASS ./test.spec.ts
test
✓ concurrency test (1004 ms)
✓ concurrency test (1 ms)
✓ concurrency test
✓ concurrency test
✓ concurrency test (1 ms)
Test Suites: 1 passed, 1 total
Tests: 5 passed, 5 total
Snapshots: 0 total
Time: 1.716 s, estimated 2 s |
The transformer is run in parallel when it's async. Example workflow run from related PR https://github.com/awslabs/aws-sdk-js-codemod/actions/runs/3804235885/jobs/6471299801 |
One performance improvement could be to run source.find on all client names at once |
Another improvement would be to pass clientsMetadata to individual function so the calls to source.find can be reduced |
Tests are now running in parallel after transformer is made async in #258 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Is your feature request related to a problem? Please describe.
The transformer tests are not run in parallel
The tests start in parallel, but are run in sync
Diff:
Output:
This leads to CI taking time. For example, the test step takes 3m https://github.com/awslabs/aws-sdk-js-codemod/actions/runs/3803141886/jobs/6469293363
Describe the solution you'd like
Experiment with Jest code or configuration to run tests in parallel
Describe alternatives you've considered
N/A
Additional Context
The text was updated successfully, but these errors were encountered: