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

Support varying degrees of test isolation #1666

Open
jadenPete opened this issue Dec 9, 2024 · 0 comments
Open

Support varying degrees of test isolation #1666

jadenPete opened this issue Dec 9, 2024 · 0 comments

Comments

@jadenPete
Copy link

This issue is part of a broader proposal to merge some of the features in lucidsoftware/rules_scala into this ruleset.

The tracking issue for this effort

The relevant proposal section.

From the proposal:

Currently, bazelbuild/rules_scala’s test runners invoke ScalaTest’s test runner or specs2’s test runner, depending on which framework is being used. This means that every test in a given target runs under the same process, which is ideal in most circumstances but may not work for tests that manipulate global state.

At Lucid, when we migrated from sbt to Bazel, running all tests in the same process posed a problem because we relied on sbt’s fork := true option, which enables test process isolation. We solved this problem by adding optional classloader and process test isolation to our ruleset, which run tests with separate classloaders and processes, respectively. See our different test runners for more details. We’d like to add these isolation settings to bazelbuild/rules_scala to ease the migration from sbt to Bazel.

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

1 participant