mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-12 03:24:14 +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);
|
assertThrows(IllegalStateException.class, route::close);
|
||||||
}
|
}
|
||||||
}, executor);
|
}, executor);
|
||||||
CompletableFuture<Void> completion = work.whenComplete((ignored, failure) -> {
|
CompletableFuture<Void> completion = work.whenCompleteAsync((ignored, failure) -> {
|
||||||
completionThread.set(Thread.currentThread());
|
completionThread.set(Thread.currentThread());
|
||||||
route.close();
|
route.close();
|
||||||
});
|
}, executor);
|
||||||
completion.get(5L, TimeUnit.SECONDS);
|
completion.get(5L, TimeUnit.SECONDS);
|
||||||
} finally {
|
} finally {
|
||||||
executor.shutdownNow();
|
executor.shutdownNow();
|
||||||
|
|||||||
Reference in New Issue
Block a user