From da7eac13c6c56bcdc9e8cef4392a8d2ef82b441d Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Mon, 25 Nov 2024 18:33:31 +0900 Subject: [PATCH] Restore MicrometerHttpRequestExecutorTest.waitForContinueGetsPassedToSuper() (#5701) --- .../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