Skip to content

Commit

Permalink
Try avoiding flakyness in ObjectSampleDumpSmokeTest
Browse files Browse the repository at this point in the history
  • Loading branch information
jbachorik committed Feb 21, 2025
1 parent e1b03ad commit 4595318
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@ public void runTest(String eventName) throws Exception {
}

public void runTest(String eventName, String ... patterns) throws Exception {
runTest(eventName, 10, patterns);
}

public void runTest(String eventName, int dumpCnt, String ... patterns) throws Exception {
Assumptions.assumeTrue(Platform.isJavaVersionAtLeast(11));
Assumptions.assumeFalse(Platform.isJ9());

for (int j = 0; j < 10; j++) {
for (int j = 0; j < dumpCnt; j++) {
Path recording = Files.createTempFile("dump-", ".jfr");
try {
for (int i = 0; i < 50; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ protected String getProfilerCommand() {
@RetryingTest(5)
@Timeout(value = 300)
public void test() throws Exception {
runTest("datadog.ObjectSample", "method3");
runTest("datadog.ObjectSample", 3, "method3");
}
}

0 comments on commit 4595318

Please sign in to comment.