gradle / test-retry-gradle-plugin

Gradle plugin to retry tests that have failed to mitigate test flakiness.
Apache License 2.0
220 stars 49 forks source link

Disable parallelism on retry #209

Open nedtwigg opened 1 year ago

nedtwigg commented 1 year ago

I have a big bank of tests where:

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'
    }
  }
}