Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions buildSrc/src/main/kotlin/datadog.configure-tests.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,15 @@ tasks.named("check") {

tasks.withType<Test>().configureEach {
// Flaky tests management for JUnit 5
if (testFramework is JUnitPlatformOptions) {
val junitPlatform = testFramework as JUnitPlatformOptions
(options as? JUnitPlatformOptions)?.apply {
if (skipFlakyTestsProvider.isPresent) {
junitPlatform.excludeTags("flaky")
excludeTags("flaky")
} else if (runFlakyTestsProvider.isPresent) {
junitPlatform.includeTags("flaky")
includeTags("flaky")
}
}

// Flaky tests management for Spock
// Set system property flag that is checked from tests to determine if they should be skipped or run
if (skipFlakyTestsProvider.isPresent) {
jvmArgs("-Drun.flaky.tests=false")
} else if (runFlakyTestsProvider.isPresent) {
Expand Down