Skip to content

test(googlehttpclient): re-enable veryLongResponseNullLength on JDK 22+ - #3696

Open
Inf1mum wants to merge 1 commit into
OpenFeign:masterfrom
Inf1mum:fix/2177-reenable-very-long-response-test
Open

Inf1mum wants to merge 1 commit into
OpenFeign:masterfrom
Inf1mum:fix/2177-reenable-very-long-response-test

Conversation

@Inf1mum

@Inf1mum Inf1mum commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Fixes #2177

What
Replace the inert assumeFalse(false, ...) shim in GoogleHttpClientTest.veryLongResponseNullLength() with an explicit assumeTrue(Runtime.version().feature() >= 22, ...) skip.

Why

  • The old shim passes false as JUnit 5's condition argument (assumeFalse(condition, message)), so it never skipped the test — AbstractClientTest.veryLongResponseNullLength() has been running in CI all along, and master stays green because the test toolchain runs on JDK 25.
  • Reproduced on JDK 21.0.5 today: the test still hangs for 60s (Feign read timeout) because NetHttpTransport blocks reading a response that declares Content-Length: Long.MAX_VALUE but sends only a few bytes.
  • Simply deleting the override (as the previous attempt in removed testVeryLongResponseNullLength #2190 did) would leave JDK 21-and-below builds hanging, so the skip is made explicit and truthful instead.

How

  • On JDK 22+ the test runs intentionally; on JDK 21 and below it skips cleanly with a message describing the actual reason.
  • The change is scoped to GoogleHttpClientTest, the one override added by 2d55093 that was still present (the JAXRSClientTest twin was already removed).

Verification

  • mvn -pl googlehttpclient -am test on JDK 21.0.5: feign-core 877 tests (4 pre-existing skips) and feign-googlehttpclient 25 tests, all green, with veryLongResponseNullLength skipped by the new assumption.
  • git-code-format:format-code produced no changes (google-java-format clean).

Signed-off-by: Inf1mum vadimlazuk5@gmail.com

What: replace the inert assumeFalse(false, ...) shim in
GoogleHttpClientTest.veryLongResponseNullLength with an explicit
assumeTrue(Runtime.version().feature() >= 22, ...) skip.

Why: with JUnit 5's (condition, message) argument order the old shim
never skipped the test. The test hangs on JDK 21 and below
(NetHttpTransport blocks reading a response that declares a huge
Content-Length but sends only a few bytes) and passes on JDK 22+,
as the master CI runs on the JDK 25 test toolchain already show.
The new skip runs the test on modern JDKs and skips it cleanly with
an accurate message on the JDKs where it hangs.

Fixes OpenFeign#2177

Signed-off-by: Inf1mum <vadimlazuk5@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Re-enable test under java 21

1 participant