Skip to content

Commit b7a159c

Browse files
committed
Fix flaky test configuration
1 parent 434b694 commit b7a159c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

buildSrc/src/main/kotlin/datadog.configure-tests.gradle.kts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,11 @@ tasks.named("check") {
107107

108108
tasks.withType<Test>().configureEach {
109109
// Flaky tests management for JUnit 5
110-
if (testFramework is JUnitPlatformOptions) {
111-
val junitPlatform = testFramework as JUnitPlatformOptions
110+
(options as? JUnitPlatformOptions)?.apply {
112111
if (skipFlakyTestsProvider.isPresent) {
113-
junitPlatform.excludeTags("flaky")
112+
excludeTags("flaky")
114113
} else if (runFlakyTestsProvider.isPresent) {
115-
junitPlatform.includeTags("flaky")
114+
includeTags("flaky")
116115
}
117116
}
118117

0 commit comments

Comments
 (0)