From cf345b832c1854e119a408da282636eabb8da809 Mon Sep 17 00:00:00 2001 From: pihme Date: Mon, 14 Mar 2022 16:44:01 +0100 Subject: [PATCH] fixup remove async execution; previously this method was also called from an Actor thread. Now it is always called from the timer thread and the thread indirection is no longer necessary --- .../camunda/zeebe/process/test/engine/EngineStateMonitor.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/engine/src/main/java/io/camunda/zeebe/process/test/engine/EngineStateMonitor.java b/engine/src/main/java/io/camunda/zeebe/process/test/engine/EngineStateMonitor.java index c3d86b4df..b2cf12d8c 100644 --- a/engine/src/main/java/io/camunda/zeebe/process/test/engine/EngineStateMonitor.java +++ b/engine/src/main/java/io/camunda/zeebe/process/test/engine/EngineStateMonitor.java @@ -13,7 +13,6 @@ import java.util.List; import java.util.Timer; import java.util.TimerTask; -import java.util.concurrent.CompletableFuture; /** * Monitor that monitors whether the engine is busy or in idle state. Busy state is a state in which @@ -67,8 +66,7 @@ private synchronized void scheduleStateNotification() { } private boolean isInIdleState() { - return CompletableFuture.supplyAsync(() -> streamProcessor.hasProcessingReachedTheEnd().join()) - .join(); + return streamProcessor.hasProcessingReachedTheEnd().join(); } @Override