Skip to content

Allow tests to run in parallel #7442

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

Open
anderseknert opened this issue Mar 12, 2025 · 1 comment
Open

Allow tests to run in parallel #7442

anderseknert opened this issue Mar 12, 2025 · 1 comment

Comments

@anderseknert
Copy link
Member

With almost 700 unit tests in the Regal codebase, and more being added, we've now reached a point where the test execution time is... noticeable. Not slow, mind you, but a couple of seconds on our fastest hardware, and many more in contexts like GitHub runners.

One obvious improvement would be to allow running tests in parallel in order to make use of more than a single CPU core where available. Rego tests should be fairly easy to parallelize given how they can't easily depend on state getting mutated between tests, etc. But I can't say I have looked into this much yet, so feel free to raise your voice if there are some things a parallel implementation would need to consider.

Having an option / opt-in to set the level of parallelism would be a great first step. Later I suppose we could either make this default to the number of cores available (like opa run) or perhaps some smart heuristic based on the number of tests to run.

Copy link

stale bot commented Apr 12, 2025

This issue has been automatically marked as inactive because it has not had any activity in the last 30 days. Although currently inactive, the issue could still be considered and actively worked on in the future. More details about the use-case this issue attempts to address, the value provided by completing it or possible solutions to resolve it would help to prioritize the issue.

@stale stale bot added the inactive label Apr 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant