Skip to content

Instantly share code, notes, and snippets.

@marcphilipp
Last active April 16, 2018 10:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcphilipp/cefc1ce5e8377cc7d6427adc8082d16f to your computer and use it in GitHub Desktop.
Save marcphilipp/cefc1ce5e8377cc7d6427adc8082d16f to your computer and use it in GitHub Desktop.
JUnit Platform Parallel Execution

Parallel Execution

  • TreeWalker that generates execution plan (ExecutionMode and ResourceLock per Node) in HierarchicalTestExecutor
    • 1st pass: ExecutionMode and ResourceLock on Node
    • 2nd pass: Pull up ResourceLocks to first Node with ResourceLock, remove ResourceLocks from children, force ExecutionMode to Same_Thread
      • Optional optimization: Only pull up locks when ResourceLock order in descendants is not compatible
    • 2nd pass (?): Inherit ExecutionMode to children
  • Thread-safe listeners
  • Decide on config parameters (factor?)
  • Capture stdout/stderr
    • Optimize case when no parallel execution takes place to capture all stdout/stderr, not just from same thread?
  • Define a few basic resources (e.g. stdout, stderr, system properties, etc.)
  • @ThreadSafe annotation and warning for non-thread-safe listeners
  • Implicit Global read lock for all tests?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment