From e90aa79605cccd8301687592e65fbd6fd1dadff6 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Fri, 22 Nov 2024 21:51:44 +0900 Subject: [PATCH] Restore MicrometerHttpRequestExecutorTest.waitForContinueGetsPassedToSuper() --- .../hc5/MicrometerHttpRequestExecutorTest.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/micrometer-core/src/test/java/io/micrometer/core/instrument/binder/httpcomponents/hc5/MicrometerHttpRequestExecutorTest.java b/micrometer-core/src/test/java/io/micrometer/core/instrument/binder/httpcomponents/hc5/MicrometerHttpRequestExecutorTest.java index 3a1683def6..eb8151bd8c 100644 --- a/micrometer-core/src/test/java/io/micrometer/core/instrument/binder/httpcomponents/hc5/MicrometerHttpRequestExecutorTest.java +++ b/micrometer-core/src/test/java/io/micrometer/core/instrument/binder/httpcomponents/hc5/MicrometerHttpRequestExecutorTest.java @@ -37,7 +37,6 @@ import org.apache.hc.core5.http.io.HttpClientResponseHandler; import org.apache.hc.core5.http.io.entity.EntityUtils; import org.apache.hc.core5.util.Timeout; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; @@ -182,12 +181,12 @@ void routeTaggedIfEnabled(boolean configureObservationRegistry, @WiremockResolve } @Test - @Disabled("brittle test using reflection to check internals of third-party code") void waitForContinueGetsPassedToSuper() { MicrometerHttpRequestExecutor requestExecutor = MicrometerHttpRequestExecutor.builder(registry) .waitForContinue(Timeout.ofMilliseconds(1000)) .build(); - assertThat(requestExecutor).hasFieldOrPropertyWithValue("waitForContinue", Timeout.ofMilliseconds(1000)); + assertThat(requestExecutor).extracting("http1Config.waitForContinueTimeout") + .isEqualTo(Timeout.ofMilliseconds(1000)); } @ParameterizedTest