Skip to content
Merged
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
2 changes: 1 addition & 1 deletion dd-java-agent/agent-debugger/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ dependencies {
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '2.3.5.RELEASE'
testImplementation group: 'org.freemarker', name: 'freemarker', version: '2.3.30'
testImplementation group: 'org.jooq', name: 'joor-java-8', version: '0.9.13'
testImplementation group: 'org.jetbrains.kotlin', name: 'kotlin-compiler-embeddable', version: "1.9.25"
testImplementation group: 'org.jetbrains.kotlin', name: 'kotlin-compiler-embeddable', version: "2.1.21"
testImplementation group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-core', version: "1.0.0"
testImplementation project(':dd-trace-core')
testImplementation project(':dd-java-agent:agent-builder')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
import org.jetbrains.kotlin.com.intellij.util.lang.JavaVersion;
import org.joor.Reflect;
import org.joor.ReflectException;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIf;
import org.junit.jupiter.api.condition.EnabledForJreRange;
import org.junit.jupiter.api.condition.EnabledOnJre;
import org.junit.jupiter.api.condition.JRE;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
Expand Down Expand Up @@ -639,11 +639,12 @@ public void sourceFileProbeGroovy() throws IOException, URISyntaxException {
}

@Test
@EnabledForJreRange(max = JRE.JAVA_24)
@DisabledIf(
value = "datadog.environment.JavaVirtualMachine#isJ9",
disabledReason = "Issue with J9 when compiling Kotlin code")
public void sourceFileProbeKotlin() throws IOException, URISyntaxException {
System.out.println(JavaVersion.class.getProtectionDomain().getCodeSource().getLocation());
System.out.println("Java version:" + JavaVersion.current().feature);
final String CLASS_NAME = "CapturedSnapshot301";
int line = getLineForLineProbe(CLASS_NAME, KOTLIN_EXT, LINE_PROBE_ID1);
TestSnapshotListener listener =
Expand All @@ -670,7 +671,6 @@ public void sourceFileProbeKotlin() throws IOException, URISyntaxException {
}

@Test
@EnabledForJreRange(max = JRE.JAVA_24)
@DisabledIf(
value = "datadog.environment.JavaVirtualMachine#isJ9",
disabledReason = "Issue with J9 when compiling Kotlin code")
Expand Down Expand Up @@ -698,7 +698,6 @@ public void suspendKotlin() throws IOException, URISyntaxException {
}

@Test
@EnabledForJreRange(max = JRE.JAVA_24)
@DisabledIf(
value = "datadog.environment.JavaVirtualMachine#isJ9",
disabledReason = "Issue with J9 when compiling Kotlin code")
Expand Down Expand Up @@ -732,7 +731,6 @@ public void suspendMethodKotlin() {
}

@Test
@EnabledForJreRange(max = JRE.JAVA_24)
@DisabledIf(
value = "datadog.environment.JavaVirtualMachine#isJ9",
disabledReason = "Issue with J9 when compiling Kotlin code")
Expand Down Expand Up @@ -2583,7 +2581,7 @@ private void doSamplingTest(TestMethod testRun, int expectedGlobalCount, int exp
}

@Test
@EnabledOnJre({JRE.JAVA_17, JRE.JAVA_21})
@EnabledForJreRange(min = JRE.JAVA_17)
public void record() throws IOException, URISyntaxException {
final String CLASS_NAME = "com.datadog.debugger.CapturedSnapshot29";
final String RECORD_NAME = "com.datadog.debugger.MyRecord1";
Expand All @@ -2603,7 +2601,7 @@ public void record() throws IOException, URISyntaxException {
}

@Test
@EnabledOnJre({JRE.JAVA_17, JRE.JAVA_21})
@EnabledForJreRange(min = JRE.JAVA_17)
public void lineRecord() throws IOException, URISyntaxException {
final String CLASS_NAME = "com.datadog.debugger.CapturedSnapshot29";
final String RECORD_NAME = "com.datadog.debugger.MyRecord2";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ public static Class<?> compileAndLoad(
args.setDestination(compilerOutputDir);
args.setClasspath(System.getProperty("java.class.path"));
ExitCode exitCode =
compiler.execImpl(
compiler.exec(
new PrintingMessageCollector(System.out, MessageRenderer.WITHOUT_PATHS, true),
Services.EMPTY,
args);
Expand Down