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

Execute all files in single process concurrently #2305

Closed
link89 opened this issue Dec 3, 2019 · 2 comments
Closed

Execute all files in single process concurrently #2305

link89 opened this issue Dec 3, 2019 · 2 comments

Comments

@link89
Copy link

link89 commented Dec 3, 2019

ava only execute one file in one process. This is good for isolation, but I hope that ava can have an option to allow executing all files in single process, and believe that users will do concurrency control by themselves.

This is good for io intensive cases. In our case, we have 100+ test files with an average 5 tests per file. Our test is based on selenium and we have a browser pool that allows open 50 browsers at the same time.

If we use ava -c 10 then we have to use distributed lock to ensure not more than 50 browsers are opened at the same time, or else case will failed, which is too complicated from my point of view.

If we use ava -c 1 then we cannot make full use of our browser pool because we don't have many cases in a file.

An idea solution for this scenario is provide an option to allow execute all files at the same time in a process. Then we can simply use tools like https://www.npmjs.com/package/throat instead of distributed lock for concurrency control. And since it is an io intensive task, so single process is acceptable.

@sindresorhus
Copy link
Member

See #1332

@novemberborn
Copy link
Member

(I'm closing this issue for housekeeping purposes, but let's keep the conversation going.)

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

No branches or pull requests

3 participants