Skip to content

Commit 4595318

Browse files
committed
Try avoiding flakyness in ObjectSampleDumpSmokeTest
1 parent e1b03ad commit 4595318

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

ddprof-test/src/test/java/com/datadoghq/profiler/jfr/JfrDumpTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@ public void runTest(String eventName) throws Exception {
1616
}
1717

1818
public void runTest(String eventName, String ... patterns) throws Exception {
19+
runTest(eventName, 10, patterns);
20+
}
21+
22+
public void runTest(String eventName, int dumpCnt, String ... patterns) throws Exception {
1923
Assumptions.assumeTrue(Platform.isJavaVersionAtLeast(11));
2024
Assumptions.assumeFalse(Platform.isJ9());
2125

22-
for (int j = 0; j < 10; j++) {
26+
for (int j = 0; j < dumpCnt; j++) {
2327
Path recording = Files.createTempFile("dump-", ".jfr");
2428
try {
2529
for (int i = 0; i < 50; i++) {

ddprof-test/src/test/java/com/datadoghq/profiler/jfr/ObjectSampleDumpSmokeTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ protected String getProfilerCommand() {
2121
@RetryingTest(5)
2222
@Timeout(value = 300)
2323
public void test() throws Exception {
24-
runTest("datadog.ObjectSample", "method3");
24+
runTest("datadog.ObjectSample", 3, "method3");
2525
}
2626
}

0 commit comments

Comments
 (0)