Skip to content

Commit 84979ca

Browse files
dougqhclaude
andcommitted
fix(okhttp): address review feedback on virtual-thread dispatcher test suite
- Replace javaLauncher override with testJvmConstraints so lower-JDK shards skip vthread21Test rather than forcing JDK 21 - Drop OkHttp 4.x from AsyncCallInstrumentation.knownMatchingTypes() until test coverage exists; trim stale 4.x javadoc - Remove ThreadPerTaskExecutorVirtualThreadTest (no OkHttp dependency, belongs in a separate PR) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 58311a9 commit 84979ca

3 files changed

Lines changed: 5 additions & 202 deletions

File tree

dd-java-agent/instrumentation/java/java-concurrent/java-concurrent-21.0/src/test/java/ThreadPerTaskExecutorVirtualThreadTest.java

Lines changed: 0 additions & 190 deletions
This file was deleted.

dd-java-agent/instrumentation/okhttp/okhttp-3.0/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ tasks.named("compileVthread21TestJava", JavaCompile) {
2323
}
2424

2525
tasks.named("vthread21Test", Test) {
26-
javaLauncher = javaToolchains.launcherFor {
27-
languageVersion = JavaLanguageVersion.of(21)
26+
testJvmConstraints {
27+
minJavaVersion = JavaVersion.VERSION_21
2828
}
2929
}
3030

dd-java-agent/instrumentation/okhttp/okhttp-3.0/src/main/java/datadog/trace/instrumentation/okhttp3/AsyncCallInstrumentation.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,8 @@
2727
* caller who actually enqueued this AsyncCall. Result: under concurrent OkHttp load, {@code
2828
* okhttp.request} spans cross-contaminate between traces.
2929
*
30-
* <p>The class moved between OkHttp 3.x and 4.x:
31-
*
32-
* <ul>
33-
* <li>OkHttp 3.x &mdash; {@code okhttp3.RealCall$AsyncCall}
34-
* <li>OkHttp 4.x &mdash; {@code okhttp3.internal.connection.RealCall$AsyncCall}
35-
* </ul>
36-
*
37-
* Both are inner classes of {@code RealCall} and both transitively implement {@link Runnable}.
30+
* <p>{@code AsyncCall} is an inner class of {@code RealCall} and transitively implements {@link
31+
* Runnable}.
3832
*/
3933
@AutoService(InstrumenterModule.class)
4034
public final class AsyncCallInstrumentation extends InstrumenterModule.Tracing
@@ -51,8 +45,7 @@ public AsyncCallInstrumentation() {
5145
@Override
5246
public String[] knownMatchingTypes() {
5347
return new String[] {
54-
"okhttp3.RealCall$AsyncCall", // OkHttp 3.x
55-
"okhttp3.internal.connection.RealCall$AsyncCall", // OkHttp 4.x
48+
"okhttp3.RealCall$AsyncCall",
5649
};
5750
}
5851

0 commit comments

Comments
 (0)