From 9d22a18a3a328b1c121a645275e48ae0679eab53 Mon Sep 17 00:00:00 2001 From: Brian Neumann-Fopiano Date: Tue, 8 Sep 2026 04:06:16 -0400 Subject: [PATCH] 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 --- .../engine/history/GenerationHistoryRuntimeRouterTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/test/java/art/arcane/iris/engine/history/GenerationHistoryRuntimeRouterTest.java b/core/src/test/java/art/arcane/iris/engine/history/GenerationHistoryRuntimeRouterTest.java index 56b43f93c..c65a26820 100644 --- a/core/src/test/java/art/arcane/iris/engine/history/GenerationHistoryRuntimeRouterTest.java +++ b/core/src/test/java/art/arcane/iris/engine/history/GenerationHistoryRuntimeRouterTest.java @@ -723,10 +723,10 @@ public final class GenerationHistoryRuntimeRouterTest { assertThrows(IllegalStateException.class, route::close); } }, executor); - CompletableFuture completion = work.whenComplete((ignored, failure) -> { + CompletableFuture completion = work.whenCompleteAsync((ignored, failure) -> { completionThread.set(Thread.currentThread()); route.close(); - }); + }, executor); completion.get(5L, TimeUnit.SECONDS); } finally { executor.shutdownNow();