Fix flaky jdk http client test
MODIFY
instrumentation/java-http-client/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/httpclient/CompletableFutureWrapper.java
instrumentation/java-http-client/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/httpclient/CompletableFutureWrapper.java
@@ -14,10 +14,6 @@ public final class CompletableFutureWrapper {
private CompletableFutureWrapper() {}
public static <T> CompletableFuture<T> wrap(CompletableFuture<T> future, Context context) {
- if (context == Context.root()) {
- return future;
- }
-
CompletableFuture<T> result = new CompletableFuture<>();
future.whenComplete(
(T value, Throwable throwable) -> {

Fix flaky jdk http client test (#5371)