Skip to content

Disable parallelism on retry #209

@nedtwigg

Description

@nedtwigg

I have a big bank of tests where:

  • 100% pass if we run the testsuite single-threaded
  • 100% sometimes pass if we run the testsuite in parallel
  • 5% of tests on average will fail if we run the testsuite in parallel, due to heavy load

This is good - we can speed up our test suite a ton by going parallel, and then rerun the handful of tests that failed due to load.

But ideally I wish the rerun could do something like:

test {
  useJUnitPlatform {}
  systemProperty 'junit.vintage.execution.parallel.enabled', 'true'
  retry {
    maxRetries = 1
    onRetry {
      systemProperty 'junit.vintage.execution.parallel.enabled', 'false'
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions