Handle failed request in http server concurrency tests
MODIFY
testing-common/src/main/java/io/opentelemetry/instrumentation/testing/junit/http/AbstractHttpServerTest.java
testing-common/src/main/java/io/opentelemetry/instrumentation/testing/junit/http/AbstractHttpServerTest.java
@@ -374,7 +374,10 @@ public abstract class AbstractHttpServerTest<SERVER> {
() -> {
Span.current().setAttribute(ServerEndpoint.ID_ATTRIBUTE_NAME, index);
propagator.inject(Context.current(), request, setter);
- client.execute(request.build()).aggregate().thenRun(latch::countDown);
+ client
+ .execute(request.build())
+ .aggregate()
+ .whenComplete((result, throwable) -> latch.countDown());
});
}
latch.await();

Handle failed request in http server concurrency tests (#5605)