-
Notifications
You must be signed in to change notification settings - Fork 11
Use default cstack for tests and improve stackwalk test coverage #331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,10 +4,17 @@ | |
|
|
||
| import org.junit.jupiter.api.Assumptions; | ||
| import org.junit.jupiter.api.Timeout; | ||
| import org.junit.jupiter.params.provider.ValueSource; | ||
| import org.junit.jupiter.api.TestTemplate; | ||
|
|
||
| import org.junitpioneer.jupiter.RetryingTest; | ||
| import com.datadoghq.profiler.junit.CStack; | ||
| import com.datadoghq.profiler.junit.RetryTest; | ||
|
|
||
| public class ObjectSampleDumpSmokeTest extends JfrDumpTest { | ||
| public ObjectSampleDumpSmokeTest(@CStack String cstack) { | ||
| super(cstack); | ||
| } | ||
|
|
||
| @Override | ||
| protected boolean isPlatformSupported() { | ||
| return !Platform.isJavaVersion(8) && !Platform.isJ9(); | ||
|
|
@@ -18,9 +25,11 @@ protected String getProfilerCommand() { | |
| return "memory=32:a"; | ||
| } | ||
|
|
||
| @RetryingTest(5) | ||
| @RetryTest(5) | ||
| @Timeout(value = 300) | ||
| public void test() throws Exception { | ||
| @TestTemplate | ||
| @ValueSource(strings = {"vm", "vmx", "fp", "dwarf"}) | ||
| public void test(@CStack String cstack) throws Exception { | ||
|
||
| runTest("datadog.ObjectSample", 3, "method3"); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,27 @@ | ||
| package com.datadoghq.profiler.jfr; | ||
|
|
||
| import org.junit.jupiter.api.Timeout; | ||
| import org.junit.jupiter.params.provider.ValueSource; | ||
| import org.junit.jupiter.api.TestTemplate; | ||
|
|
||
| import org.junitpioneer.jupiter.RetryingTest; | ||
| import com.datadoghq.profiler.junit.CStack; | ||
| import com.datadoghq.profiler.junit.RetryTest; | ||
|
|
||
| public class WallclockDumpSmokeTest extends JfrDumpTest { | ||
| public WallclockDumpSmokeTest(@CStack String cstack) { | ||
| super(cstack); | ||
| } | ||
|
|
||
| @Override | ||
| protected String getProfilerCommand() { | ||
| return "wall=5ms"; | ||
| } | ||
|
|
||
| @RetryingTest(3) | ||
| @RetryTest(3) | ||
| @Timeout(value = 60) | ||
| public void test() throws Exception { | ||
| @TestTemplate | ||
| @ValueSource(strings = {"vm", "vmx", "fp", "dwarf"}) | ||
| public void test(@CStack String cstack) throws Exception { | ||
|
||
| registerCurrentThreadForWallClockProfiling(); | ||
| runTest("datadog.MethodSample"); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test method parameter
cstackis annotated with@CStackbut never used within the method body. If the cstack configuration is meant to influence test behavior, it should be passed to the test setup or profiler configuration.