From 4e4b73f4ebb960ec145e83e50d733806ca48334f Mon Sep 17 00:00:00 2001 From: Nico Korthout Date: Wed, 2 Oct 2024 09:36:03 +0200 Subject: [PATCH 1/2] fix: don't pass actor scheduler to logstream Logstream no longer requires the actor scheduler, and this method `.withActorSchedulingService` has been removed with a recent PR (see below). We can safely remove this from our logstream builder in the same way as this was done for production zeebe, as the logstream no longer depends on scheduling tasks in the future. Rather it has become completely synchronous. This should be transparent to ZPT, but wasn't as the logstream builder required passing the actor scheduler until now. See: https://github.com/camunda/camunda/pull/22870 --- .../java/io/camunda/zeebe/process/test/engine/EngineFactory.java | 1 - 1 file changed, 1 deletion(-) diff --git a/engine/src/main/java/io/camunda/zeebe/process/test/engine/EngineFactory.java b/engine/src/main/java/io/camunda/zeebe/process/test/engine/EngineFactory.java index c5244cdbe..a3317ccae 100644 --- a/engine/src/main/java/io/camunda/zeebe/process/test/engine/EngineFactory.java +++ b/engine/src/main/java/io/camunda/zeebe/process/test/engine/EngineFactory.java @@ -131,7 +131,6 @@ private static LogStream createLogStream( return LogStream.builder() .withPartitionId(partitionId) .withLogStorage(logStorage) - .withActorSchedulingService(scheduler) .withClock(clock) .build(); } From 7048b77a0a8b389217d41920ecfe3236984c0787 Mon Sep 17 00:00:00 2001 From: Nico Korthout Date: Wed, 2 Oct 2024 09:39:35 +0200 Subject: [PATCH 2/2] refactor: remove unused parameter Simply deletion of no longer needed parameter. --- .../camunda/zeebe/process/test/engine/EngineFactory.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/engine/src/main/java/io/camunda/zeebe/process/test/engine/EngineFactory.java b/engine/src/main/java/io/camunda/zeebe/process/test/engine/EngineFactory.java index a3317ccae..77fd85734 100644 --- a/engine/src/main/java/io/camunda/zeebe/process/test/engine/EngineFactory.java +++ b/engine/src/main/java/io/camunda/zeebe/process/test/engine/EngineFactory.java @@ -67,7 +67,7 @@ private static ZeebeTestEngine create(final int port, final Consumer req final ActorScheduler scheduler = createAndStartActorScheduler(clock); final InMemoryLogStorage logStorage = new InMemoryLogStorage(); - final LogStream logStream = createLogStream(logStorage, scheduler, partitionId, clock); + final LogStream logStream = createLogStream(logStorage, partitionId, clock); final CommandWriter commandWriter = new CommandWriter(logStream.newLogStreamWriter()); final CommandSender commandSender = new CommandSender(commandWriter); @@ -124,10 +124,7 @@ private static ActorScheduler createAndStartActorScheduler(final ActorClock cloc } private static LogStream createLogStream( - final LogStorage logStorage, - final ActorSchedulingService scheduler, - final int partitionId, - final ActorClock clock) { + final LogStorage logStorage, final int partitionId, final ActorClock clock) { return LogStream.builder() .withPartitionId(partitionId) .withLogStorage(logStorage)