Skip to content
Draft
Show file tree
Hide file tree
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
30 changes: 16 additions & 14 deletions buildSrc/src/main/kotlin/dd-trace-java.configure-tests.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -81,21 +81,23 @@ tasks.named("check") {
}

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

// 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) {
jvmArgs("-Drun.flaky.tests=true")
}
// // Flaky tests management for JUnit 5
// (options as? JUnitPlatformOptions)?.apply {
// if (skipFlakyTestsProvider.isPresent) {
// excludeTags("flaky")
// } else if (runFlakyTestsProvider.isPresent) {
// includeTags("flaky")
// }
// }

// // 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) {
// jvmArgs("-Drun.flaky.tests=true")
// }
}

tasks.withType<Test>().configureEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ class OpensearchTransportClientTest extends InstrumentationSpecification {
def status = result.get().status

expect:
status.name() == "GREEN"
// should fail here
status.name() == "XGREEN"
assertTraces(2) {
trace(1) {
span {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,10 @@ abstract class SynapseTest extends VersionedNamingTestBase {
int statusCode = client.newCall(request).execute().code()

then:
// should fail here
assertTraces(1) {
trace(1) {
serverSpan(it, 0, 'GET', statusCode, query)
serverSpan(it, 1, 'GET', statusCode, query)
}
}
statusCode == 200
Expand Down