Repository navigation
Honor zero connect and read timeouts in the Java11 client - #3637
Conversation
Omit JDK timeout setters for the documented unbounded value and match a native client with no connect timeout. Preserve positive limits and negative rejection. Fixes OpenFeign#3635
velo
left a comment
There was a problem hiding this comment.
Checked that both JDK setters reject Duration.ZERO, so before this change a 0 timeout threw instead of meaning no timeout. Skipping the setter is the right fix, and treating an absent native connect timeout as 0 in doesClientConfigurationDiffer avoids building a needless per-request client. The tests cover sync and async, each zero combination, a positive control and negative-value rejection, and they would fail on master. Nit: #3462 adds a body-read timeout that also treats <= 0 as no timeout, so the two agree.
|
@hutiefang76 this is approved and set to auto-merge, but it now conflicts with master in CHANGELOG.md, because other PRs have added entries under |
Signed-off-by: Marvin Froeder <velo.br@gmail.com> # Conflicts: # CHANGELOG.md
|
Merged master; CHANGELOG.md was removed from the repo so the entry was dropped. |
Closes #3635.
Honor the documented
0= no timeout contract by omitting the JDK connect/request timeout setters for zero. An absent native connect timeout now matches zero options. Positive timeouts and rejection of negative values are preserved; streaming response-body timeouts (#3068) are outside this change.The real HTTP baseline had 7 zero-timeout errors and 2 passing positive controls across synchronous/asynchronous execution. All 11 regression cases now pass, including negative-value controls.
Validation: root
./mvnw -Pdev validateand./mvnw -Pdev -pl java11 -am clean verifypassed with real Zulu 8/11 main compilation and Temurin 25 tests (891 tests, 0 failures/errors, 4 existing conditional skips). License and formatting checks stayed enabled.