Skip to content

Execute test classes concurrently#111

Merged
jadenPete merged 2 commits into
lucid-masterfrom
jpeterson-implements-parallel-tests
May 23, 2026
Merged

Execute test classes concurrently#111
jadenPete merged 2 commits into
lucid-masterfrom
jpeterson-implements-parallel-tests

Conversation

@jadenPete
Copy link
Copy Markdown

@jadenPete jadenPete commented May 21, 2026

This PR updates the test runner to execute test classes (formally referred to as tasks in the context of the SBT test interface) concurrently. Most test frameworks will already execute individual test cases concurrently, but it's up to the test runner to execute whole test classes at the same time.

SBT already does this by default, so I think it's reasonable to expect that Bazel should do this via rules_scala. However, if this isn't desired because a test depends on sequential execution (e.g. because it relies on some global state), one can set sequential = True on the scala_test target to disable this feature.

One consequence of this change is that we don't print a summary for each test class until after it's finished executing, but I figured this shouldn't be too big of an issue as Bazel buffers test output by default anyway.

@jadenPete jadenPete force-pushed the jpeterson-implements-parallel-tests branch from 505e885 to 0a674c5 Compare May 21, 2026 19:26
@jadenPete jadenPete force-pushed the jpeterson-implements-parallel-tests branch from 0a674c5 to 1e0480b Compare May 21, 2026 19:39
Comment thread tests/test-frameworks/concurrency/test
Copy link
Copy Markdown

@blainefreestone blainefreestone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple small verifications for testing and concurrency stuff and then should be good to go.

Comment thread src/main/scala/higherkindness/rules_scala/common/sbt-testing/Executors.scala Outdated
@jadenPete jadenPete force-pushed the jpeterson-implements-parallel-tests branch from 1e0480b to 8a0c1b2 Compare May 22, 2026 19:22
@jadenPete jadenPete merged commit 421acee into lucid-master May 23, 2026
1 check passed
@jadenPete jadenPete deleted the jpeterson-implements-parallel-tests branch May 23, 2026 17:13
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 this pull request may close these issues.

3 participants