ant icon indicating copy to clipboard operation
ant copied to clipboard

junitlauncher - Added fork mode support

Open azotcsit opened this issue 4 years ago • 0 comments

Context

I'm working on migration of Cassandra to JUnit5 (https://issues.apache.org/jira/browse/CASSANDRA-16630). Our test running code is heavily customized and relies onto forkMode property. Unfortunately, junitlauncher task does not have any equivalent. The purpose of this change is to introduce a way to run tests independently (in separate JVMs).

Behavior

This PR does not change any existing behavior. By default, the tests will be run in the same forked JVM (aka mode="once").

Summary of the changes

  1. Added node attribute to fork element
  2. Added logic to spin a JVM per test suite class into JUnitLauncherTask
  3. Updated tests and documentation

I'm not sure JUnitLauncherTaskTest is run during ./build clean test, hence the test might be broken.

azotcsit avatar Dec 22 '21 13:12 azotcsit