Skip to content

Commit b4dfab9

Browse files
committed
Enable test retry selectively
Test retry is disabled in all compilation test classes, where each test is responsible for compiling many files separately.
1 parent e9e046d commit b4dfab9

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Diff for: project/Build.scala

+19
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,18 @@ object Build {
276276
val config = develocityConfiguration.value
277277
val buildScan = config.buildScan
278278
val buildCache = config.buildCache
279+
// disable test retry on compilation test classes
280+
val noRetryTestClasses = Set(
281+
"dotty.tools.dotc.BestEffortOptionsTests",
282+
"dotty.tools.dotc.CompilationTests",
283+
"dotty.tools.dotc.FromTastyTests",
284+
"dotty.tools.dotc.IdempotencyTests",
285+
"dotty.tools.dotc.ScalaJSCompilationTests",
286+
"dotty.tools.dotc.TastyBootstrapTests",
287+
"dotty.tools.dotc.coverage.CoverageTests",
288+
"dotty.tools.dotc.transform.PatmatExhaustivityTest",
289+
"dotty.tools.repl.ScriptedTests"
290+
)
279291
config
280292
.withProjectId(ProjectId("scala3"))
281293
.withServer(config.server.withUrl(Some(url("https://develocity.scala-lang.org"))))
@@ -293,6 +305,13 @@ object Build {
293305
.withLocal(buildCache.local.withEnabled(false))
294306
.withRemote(buildCache.remote.withEnabled(false))
295307
)
308+
.withTestRetryConfiguration(
309+
config.testRetryConfiguration
310+
.withFlakyTestPolicy(FlakyTestPolicy.Fail)
311+
.withMaxRetries(1)
312+
.withMaxFailures(10)
313+
.withClassesFilter((className, _) => !noRetryTestClasses.contains(className))
314+
)
296315
}
297316
)
298317

0 commit comments

Comments
 (0)