Repository navigation
Completes async client futures when the delegate throws Error - #3630
Conversation
velo
left a comment
There was a problem hiding this comment.
Checked DefaultAsyncClient: the task goes through executorService.submit, so an Error was already captured in the discarded FutureTask and never rethrown anywhere; completing the caller's future with it surfaces the Error instead of swallowing it, which is the right channel. Both regressions time out without the change. Nits: the three control tests are mostly redundant with existing coverage, and the inline comment in DefaultAsyncClient could go since the catch speaks for itself.
|
Approved, but this now conflicts with master in CHANGELOG.md (a 13.18 section was added by another merge). Could you merge or rebase master and append your entry under the existing |
Signed-off-by: Marvin Froeder <velo.br@gmail.com> # Conflicts: # CHANGELOG.md
Signed-off-by: Marvin Froeder <velo.br@gmail.com>
|
Merged master; CHANGELOG.md was removed from the repo so the entry was dropped. Also removed the redundant inline comment from the review nit. |
Fixes #3629.
When a synchronous
Clientthrows anError,DefaultAsyncClientcurrently lets the executor capture it in a task future that is only used for cancellation. The separate future returned to the caller remains pending, including throughAsyncFeign. Complete that future exceptionally with the original throwable. Executor rejection, cancellation, checked/runtime exceptions and the other async adapters retain their existing behavior.Two bounded regressions cover the direct adapter and public proxy, with the same error instance asserted as the cause. IOException, runtime-exception and successful-response controls are included in the existing test class. The changelog records the fix; no API or dependency changes.
Validation:
AsyncFeignTest59 tests, 2 failures from the expected one-second timeouts; 0 errors/skips.mvn -B -Pdev -pl core clean installpasses, 777 tests, 0 failures/errors, 4 existing conditional skips. All 59 async tests pass without skips.mvn -B -Pdev validatepasses. Main sources used a real JDK 8 toolchain and tests used JDK 25. A normal checkout was used because the license plugin fails to recognize Git worktrees; license and formatting checks were retained, and the three final files were matched by SHA-256.AI assistance: DeepSeek assisted implementation and first-pass review; Codex ran and checked the reproduction, validation and final diff. Remote CI and maintainer review remain pending.