You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DefaultAsyncClient never completes the returned future when Client throws Error #3629
DefaultAsyncClient can leave its returned CompletableFuture pending forever when the synchronous client throws an Error.
The adapter submits a task to an ExecutorService, then completes a separate future inside catch (Exception). An AssertionError bypasses that catch. The executor captures it in its own FutureTask, while the future returned to the caller is never completed. This also hangs a call made through AsyncFeign.
A bounded reproduction on current master e32547a uses a normal single-thread executor and a client lambda that throws one pre-created AssertionError:
Expected: an ExecutionException whose cause is the original error, consistent with the AsyncClient completion contract. Actual: TimeoutException.
I added direct-adapter and public AsyncFeign cases to the existing AsyncFeignTest, with IOException, runtime-exception and successful-response controls. The actual run reports 59 tests, 2 failures, 0 errors/skips; both failures are the expected timeout. Each executor is shut down in finally; the cases use no network request or real VM exhaustion.
Verification used the unmodified Maven build with the dev profile, JDK 8 for main sources and JDK 25 for tests. The change can be limited to completing the returned future exceptionally for any throwable from the synchronous client; executor rejection and other async adapters are outside this report. I will send that small fix with these regressions and a changelog entry.
Activity