Skip to content

Commit

Permalink
Document ClassOrderer wrt. parallel execution
Browse files Browse the repository at this point in the history
Resolves #3007.
  • Loading branch information
marcphilipp committed Jun 25, 2023
1 parent 4cadc8a commit bc37aab
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions documentation/src/docs/asciidoc/user-guide/writing-tests.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -664,8 +664,8 @@ dependencies between test classes, or you may wish to order test classes to opti
time as outlined in the following scenarios.

* Run previously failing tests and faster tests first: "fail fast" mode
* With parallel execution enabled, run longer tests first: "shortest test plan execution
duration" mode
* With parallel execution enabled, schedule longer tests first: "shortest test plan
execution duration" mode
* Various other use cases

To configure test class execution order _globally_ for the entire test suite, use the
Expand Down Expand Up @@ -2302,6 +2302,12 @@ might conflict with the configured execution order. Thus, in both cases, test me
such test classes are only executed concurrently if the `@Execution(CONCURRENT)`
annotation is present on the test class or method.

When parallel execution is enabled and a default `{ClassOrderer}` (see
<<writing-tests-test-execution-order-classes>> for details) is registered, top-level test
classes will initially be sorted accordingly and scheduled in that order. However, they
are not guaranteed to be started in exactly that order since the threads they are executed
on are not controlled directly by JUnit.

All nodes of the test tree that are configured with the `CONCURRENT` execution mode will
be executed fully in parallel according to the provided
<<writing-tests-parallel-execution-config, configuration>> while observing the
Expand Down

0 comments on commit bc37aab

Please sign in to comment.