From 2b3a187a524ae9ece0caa67a4542c04408226957 Mon Sep 17 00:00:00 2001 From: jean-philippe bempel Date: Sun, 12 Jul 2026 18:12:14 +0200 Subject: [PATCH] DRAFT --- .gitlab/exploration-tests.yml | 12 ++++ .../Dockerfile.exploration-tests | 8 ++- .../exploration-tests/include_okhttp.txt | 1 + .../okhttp_exploration-tests.patch | 66 +++++++++++++++++++ 4 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 dd-java-agent/agent-debugger/exploration-tests/include_okhttp.txt create mode 100644 dd-java-agent/agent-debugger/exploration-tests/okhttp_exploration-tests.patch diff --git a/.gitlab/exploration-tests.yml b/.gitlab/exploration-tests.yml index e8818e6e060..afa2fdb4193 100644 --- a/.gitlab/exploration-tests.yml +++ b/.gitlab/exploration-tests.yml @@ -103,3 +103,15 @@ exploration-tests-line-jackson-databind: PROJECT: jackson-databind script: - ./run-exploration-tests.sh "line" "$PROJECT" "./mvnw verify" "include_${PROJECT}.txt" "exclude_line_$PROJECT.txt" + +exploration-tests-method-okhttp: + needs: [ build ] + dependencies: + - build + <<: *common-exploration-tests + variables: + PROJECT: okhttp + script: + - sdk use java 17.0.10-tem + - java -XshowSettings:system -version + - ./run-exploration-tests.sh "method" "$PROJECT" "./gradlew --max-workers 4 jvmTest -Dtest.java.version=11" "include_${PROJECT}.txt" "exclude_$PROJECT.txt" diff --git a/dd-java-agent/agent-debugger/exploration-tests/Dockerfile.exploration-tests b/dd-java-agent/agent-debugger/exploration-tests/Dockerfile.exploration-tests index 7c890262858..ca275269422 100644 --- a/dd-java-agent/agent-debugger/exploration-tests/Dockerfile.exploration-tests +++ b/dd-java-agent/agent-debugger/exploration-tests/Dockerfile.exploration-tests @@ -10,6 +10,7 @@ COPY .sdkmanrc . RUN curl -s "https://get.sdkman.io" | bash RUN bash -c "source $HOME/.sdkman/bin/sdkman-init.sh && \ sdk env install && \ + sdk install java 17.0.10-tem && \ sdk flush" RUN mkdir exploration-tests @@ -30,7 +31,7 @@ RUN cd jackson-core && git apply /exploration-tests/jackson-core_exploration-tes RUN bash -c "source $HOME/.sdkman/bin/sdkman-init.sh && cd jackson-core && mvn verify -DskipTests=true" RUN git clone -b 2.16 https://github.com/FasterXML/jackson-databind.git COPY jackson-databind_exploration-tests.patch . -# fix tests that are failing because too deep recrursion +# fix tests that are failing because too deep recursion RUN cd jackson-databind && git apply /exploration-tests/jackson-databind_exploration-tests.patch RUN bash -c "source $HOME/.sdkman/bin/sdkman-init.sh && cd jackson-databind && mvn verify -DskipTests=true" @@ -42,3 +43,8 @@ RUN bash -c "source $HOME/.sdkman/bin/sdkman-init.sh && cd jackson-databind && m #RUN git clone https://github.com/google/guava.git #RUN bash -c "source $HOME/.sdkman/bin/sdkman-init.sh && cd guava && mvn -B -P!standard-with-extra-repos verify -U -Dmaven.javadoc.skip=true -DskipTests=true" +# okhttp +RUN git clone -b okhttp_5.3.x https://github.com/square/okhttp.git +COPY okhttp_exploration-tests.patch . +RUN cd okhttp && git apply /exploration-tests/okhttp_exploration-tests.patch +RUN bash -c "source $HOME/.sdkman/bin/sdkman-init.sh && sdk use java 17.0.10-tem && cd okhttp && ./gradlew dependencies" diff --git a/dd-java-agent/agent-debugger/exploration-tests/include_okhttp.txt b/dd-java-agent/agent-debugger/exploration-tests/include_okhttp.txt new file mode 100644 index 00000000000..875f907d01b --- /dev/null +++ b/dd-java-agent/agent-debugger/exploration-tests/include_okhttp.txt @@ -0,0 +1 @@ +okhttp3/* diff --git a/dd-java-agent/agent-debugger/exploration-tests/okhttp_exploration-tests.patch b/dd-java-agent/agent-debugger/exploration-tests/okhttp_exploration-tests.patch new file mode 100644 index 00000000000..48eab38c86a --- /dev/null +++ b/dd-java-agent/agent-debugger/exploration-tests/okhttp_exploration-tests.patch @@ -0,0 +1,66 @@ +diff --git a/okhttp/src/jvmTest/kotlin/okhttp3/InterceptorTest.kt b/okhttp/src/jvmTest/kotlin/okhttp3/InterceptorTest.kt +index 22f1ceaf5..3df72113b 100644 +--- a/okhttp/src/jvmTest/kotlin/okhttp3/InterceptorTest.kt ++++ b/okhttp/src/jvmTest/kotlin/okhttp3/InterceptorTest.kt +@@ -50,6 +50,7 @@ import okio.GzipSink + import okio.Sink + import okio.Source + import okio.buffer ++import org.junit.jupiter.api.Disabled + import org.junit.jupiter.api.Tag + import org.junit.jupiter.api.Test + import org.junit.jupiter.api.extension.RegisterExtension +@@ -608,11 +609,13 @@ class InterceptorTest { + ) + } + ++ @Disabled + @Test + fun applicationInterceptorThrowsRuntimeExceptionAsynchronous() { + interceptorThrowsRuntimeExceptionAsynchronous(false) + } + ++ @Disabled + @Test + fun networkInterceptorThrowsRuntimeExceptionAsynchronous() { + interceptorThrowsRuntimeExceptionAsynchronous(true) +diff --git a/okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/ClientAuthTest.kt b/okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/ClientAuthTest.kt +index d78fd43e1..5a3429050 100644 +--- a/okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/ClientAuthTest.kt ++++ b/okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/ClientAuthTest.kt +@@ -57,6 +57,7 @@ import okhttp3.tls.HeldCertificate + import okhttp3.tls.internal.TlsUtil.newKeyManager + import okhttp3.tls.internal.TlsUtil.newTrustManager + import org.junit.jupiter.api.BeforeEach ++import org.junit.jupiter.api.Disabled + import org.junit.jupiter.api.Tag + import org.junit.jupiter.api.Test + import org.junit.jupiter.api.extension.RegisterExtension +@@ -310,6 +311,7 @@ class ClientAuthTest { + } + } + ++ @Disabled + @Test + fun invalidClientAuthEvents() { + server.enqueue( +diff --git a/okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/WebSocketReaderTest.kt b/okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/WebSocketReaderTest.kt +index d3f264333..22d709282 100644 +--- a/okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/WebSocketReaderTest.kt ++++ b/okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/WebSocketReaderTest.kt +@@ -32,6 +32,7 @@ import okio.ByteString.Companion.decodeHex + import okio.ByteString.Companion.encodeUtf8 + import okio.ByteString.Companion.toByteString + import org.junit.jupiter.api.AfterEach ++import org.junit.jupiter.api.Disabled + import org.junit.jupiter.api.Test + + class WebSocketReaderTest { +@@ -431,6 +432,7 @@ class WebSocketReaderTest { + assertThat(count).isEqualTo(1988) + } + ++ @Disabled + @Test fun clientWithCompressionCannotBeUsedAfterClose() { + data.write("c107f248cdc9c90700".decodeHex()) // Hello + clientReaderWithCompression.processNextFrame()