Fix feign-core test compilation broken by removed Request.create overload#3406
Open
seonwooj0810 wants to merge 3 commits into
Open
Fix feign-core test compilation broken by removed Request.create overload#3406seonwooj0810 wants to merge 3 commits into
seonwooj0810 wants to merge 3 commits into
Conversation
…signature JavaLoggerTest and LoggerRebufferTest still called the Request.create(..., byte[], Charset) overload removed in f9159cf, breaking test compilation of feign-core on master. Use the (Body, RequestTemplate) signature with null arguments, matching the existing usage in RetryableExceptionTest.
…e) signature Slf4jLoggerTest had the same problem as the feign-core logger tests: it called the removed Request.create(..., byte[], Charset) overload and also referenced feign.Util without an import, breaking feign-slf4j test compilation once feign-core compiles again.
… signature Both BeanValidationMethodInterceptorTest variants still used the RequestTemplate#body(String) overload removed in f9159cf.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
mastercurrently fails to build: several test classes still use APIs removed in f9159cf ("prevent Content-Length smuggling, log format-string injection, and common-pool starvation in streaming bodies"), so test compilation fails with:This breaks master's own snapshot builds (e.g. CircleCI 11938, 11953) and every PR branch rebased onto current master (e.g. #3382, CircleCI 12024/12030).
How
Test-only changes, adapting the affected call sites to the current API (the CI reactor stops at the first failing module, so these surfaced one module at a time):
JavaLoggerTest,LoggerRebufferTest: switch 10 call sites from the removedRequest.create(HttpMethod, String, Map, byte[], Charset)overload to the current(Body, RequestTemplate)signature withnullbody/template, matching the existing usage inRetryableExceptionTest. The logger tests only exercise response rebuffering, so the request body/charset is irrelevant to their assertions.Slf4jLoggerTest: same removedRequest.createoverload, plus a missingfeign.Utilimport.BeanValidationMethodInterceptorTest: replace the removedRequestTemplate#body(String)withbody(Request.Body.of(...)).I also grepped the whole repo for the remaining removed APIs (
RequestTemplate#body(String),requestCharset(), thebyte[]-returningbody(),ThrowingConsumer,FeignBodyEntity) — no further usages outsidesrc/main.No production code is touched.