mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-11 19:14:11 +00:00
Close route off the caller thread
- Complete the async route close on the worker executor so the cross-thread assertion no longer depends on whether the first stage finished before the handler was attached
This commit is contained in:
+2
-2
@@ -723,10 +723,10 @@ public final class GenerationHistoryRuntimeRouterTest {
|
||||
assertThrows(IllegalStateException.class, route::close);
|
||||
}
|
||||
}, executor);
|
||||
CompletableFuture<Void> completion = work.whenComplete((ignored, failure) -> {
|
||||
CompletableFuture<Void> completion = work.whenCompleteAsync((ignored, failure) -> {
|
||||
completionThread.set(Thread.currentThread());
|
||||
route.close();
|
||||
});
|
||||
}, executor);
|
||||
completion.get(5L, TimeUnit.SECONDS);
|
||||
} finally {
|
||||
executor.shutdownNow();
|
||||
|
||||
Reference in New Issue
Block a user