Skip to content
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

Request: Add --parallel to deno test #6559

Closed
jakajancar opened this issue Jun 29, 2020 · 8 comments · Fixed by #9815
Closed

Request: Add --parallel to deno test #6559

jakajancar opened this issue Jun 29, 2020 · 8 comments · Fixed by #9815

Comments

@jakajancar
Copy link

Would be nice if tests could be run in parallel.

Of course, assuming you take care of any shared resources correctly.

I'm fine giving up "leaking async ops" checks, or maybe just have one at the end "One of your tests leaked async ops, run without --parallel to troubleshoot"...

@caspervonb
Copy link
Contributor

Just an aside; you can test files in parallel with something like xargs or par

find -name "*_test.ts" | xargs -P4 deno test -A --unstable

@jakajancar
Copy link
Author

With separate processes, coordinating shared resource (e.g. db) parallelism / locking is non-trivial.

Within the same process you can just have the tests call a function.

@stale
Copy link

stale bot commented Jan 6, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 6, 2021
@stale stale bot closed this as completed Jan 13, 2021
@kt3k
Copy link
Member

kt3k commented Jan 15, 2021

Jest has parallel testing builtin. I think this feature might help contributing to the adoption of deno test.

@kt3k kt3k reopened this Jan 15, 2021
@stale stale bot removed the stale label Jan 15, 2021
@caspervonb
Copy link
Contributor

Yeah I've got plans to work on the test runner soon.

@stale
Copy link

stale bot commented Mar 16, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 16, 2021
@wperron wperron removed the stale label Mar 16, 2021
@vaysagekv
Copy link

Just an aside; you can test files in parallel with something like xargs or par

find -name "*_test.ts" | xargs -P4 deno test -A --unstable

I have tried the above comment. But still Deno test is running sequentially

@caspervonb
Copy link
Contributor

caspervonb commented Apr 9, 2021

I have tried the above comment. But still Deno test is running sequentially

Might need -n1 -P4

This will be added to the test runner in 1.9 however.
Reason for integrating it was to avoid re-checking the dependency graph for each test module loaded, turns out doing xargs was kinda slow 🙃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants