Skip to content

Allow tests to run in parallel #7442

@anderseknert

Description

@anderseknert

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions