Skip to content

Commit cf1cd7e

Browse files
Mark AppSecActivationSmokeTest as flaky in oracle8
1 parent 0df702a commit cf1cd7e

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

dd-smoke-tests/dynamic-config/src/test/groovy/datadog/smoketest/AppSecActivationSmokeTest.groovy

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ package datadog.smoketest
33
import datadog.remoteconfig.Capabilities
44
import datadog.remoteconfig.Product
55
import datadog.smoketest.dynamicconfig.AppSecApplication
6+
import datadog.trace.test.util.Flaky
7+
8+
import static datadog.trace.test.util.Predicates.ORACLE8
69

710
class AppSecActivationSmokeTest extends AbstractSmokeTest {
811

@@ -24,6 +27,7 @@ class AppSecActivationSmokeTest extends AbstractSmokeTest {
2427
processBuilder.directory(new File(buildDirectory))
2528
}
2629

30+
@Flaky(value = "Telemetry product change event flakes in oracle8", condition = ORACLE8)
2731
void 'test activation via RC workflow'() {
2832
given:
2933
final asmRuleProducts = [Product.ASM, Product.ASM_DD, Product.ASM_DATA]

utils/test-utils/src/main/groovy/datadog/trace/test/util/Predicates.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,27 @@ public boolean test(final String spec) {
2929
return version.equals(VERSION);
3030
}
3131
}
32+
33+
public static class ORACLE implements Predicate<String> {
34+
private static final String ORACLE_VENDOR_STRING = "Oracle";
35+
36+
@Override
37+
public boolean test(String s) {
38+
return System.getProperty("java.vendor", "").contains(ORACLE_VENDOR_STRING);
39+
}
40+
}
41+
42+
public static final class ORACLE8 extends ORACLE {
43+
private static final BigDecimal VERSION = new BigDecimal("1.8");
44+
45+
@Override
46+
public boolean test(final String spec) {
47+
if (!super.test(spec)) {
48+
return false;
49+
}
50+
final BigDecimal version =
51+
new BigDecimal(System.getProperty("java.specification.version", "-1"));
52+
return version.equals(VERSION);
53+
}
54+
}
3255
}

0 commit comments

Comments
 (0)