Skip to content

Commit

Permalink
Enable test retry selectively
Browse files Browse the repository at this point in the history
Test retry is disabled in all compilation test classes,
where each test is responsible for compiling many files separately.
  • Loading branch information
adpi2 committed Aug 28, 2024
1 parent e9e046d commit b4dfab9
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,18 @@ object Build {
val config = develocityConfiguration.value
val buildScan = config.buildScan
val buildCache = config.buildCache
// disable test retry on compilation test classes
val noRetryTestClasses = Set(
"dotty.tools.dotc.BestEffortOptionsTests",
"dotty.tools.dotc.CompilationTests",
"dotty.tools.dotc.FromTastyTests",
"dotty.tools.dotc.IdempotencyTests",
"dotty.tools.dotc.ScalaJSCompilationTests",
"dotty.tools.dotc.TastyBootstrapTests",
"dotty.tools.dotc.coverage.CoverageTests",
"dotty.tools.dotc.transform.PatmatExhaustivityTest",
"dotty.tools.repl.ScriptedTests"
)
config
.withProjectId(ProjectId("scala3"))
.withServer(config.server.withUrl(Some(url("https://develocity.scala-lang.org"))))
Expand All @@ -293,6 +305,13 @@ object Build {
.withLocal(buildCache.local.withEnabled(false))
.withRemote(buildCache.remote.withEnabled(false))
)
.withTestRetryConfiguration(
config.testRetryConfiguration
.withFlakyTestPolicy(FlakyTestPolicy.Fail)
.withMaxRetries(1)
.withMaxFailures(10)
.withClassesFilter((className, _) => !noRetryTestClasses.contains(className))
)
}
)

Expand Down

0 comments on commit b4dfab9

Please sign in to comment.