From 067f953a1b1c2f86ce3ba8905284f131fb23aac1 Mon Sep 17 00:00:00 2001 From: Remco Westerhoud Date: Mon, 1 May 2023 13:43:56 +0200 Subject: [PATCH 1/2] fix: add ProcessInstanceBatch to RecordLogger Adds the new ProcessInstanceBatch ValueType to the RecordLogger. There is no assertions over this record and no relevant context for users in it. Because of this we can leave the logging empty. (cherry picked from commit e2ea71f6ab39eec254743b8ba84708f9e12f6b4e) --- .../zeebe/process/test/filters/logger/RecordStreamLogger.java | 1 + 1 file changed, 1 insertion(+) diff --git a/filters/src/main/java/io/camunda/zeebe/process/test/filters/logger/RecordStreamLogger.java b/filters/src/main/java/io/camunda/zeebe/process/test/filters/logger/RecordStreamLogger.java index 6a6de9ad..65ed1ef6 100644 --- a/filters/src/main/java/io/camunda/zeebe/process/test/filters/logger/RecordStreamLogger.java +++ b/filters/src/main/java/io/camunda/zeebe/process/test/filters/logger/RecordStreamLogger.java @@ -112,6 +112,7 @@ public RecordStreamLogger(final RecordStreamSource recordStreamSource) { valueTypeLoggers.put(ValueType.RESOURCE_DELETION, this::logResourceDeletionRecordValue); valueTypeLoggers.put(ValueType.COMMAND_DISTRIBUTION, this::logCommandDistributionRecordValue); + valueTypeLoggers.put(ValueType.PROCESS_INSTANCE_BATCH, record -> ""); } public void log() { From 947a251eff70ee19429e817f3bc313a688a28b95 Mon Sep 17 00:00:00 2001 From: Remco Westerhoud Date: Mon, 1 May 2023 13:45:00 +0200 Subject: [PATCH 2/2] feat(db): implement whileEqualPrefix with startAtKey Implements the new whileEqualPrefix with startAtKey method. This was introduces in Zeebe for terminating child instances in batches. (cherry picked from commit bb98534a21c6ac7c01961759c2150a9e72bfd30d) --- .../process/test/engine/db/InMemoryDbColumnFamily.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/engine/src/main/java/io/camunda/zeebe/process/test/engine/db/InMemoryDbColumnFamily.java b/engine/src/main/java/io/camunda/zeebe/process/test/engine/db/InMemoryDbColumnFamily.java index 4ddca74d..a9a4aa34 100644 --- a/engine/src/main/java/io/camunda/zeebe/process/test/engine/db/InMemoryDbColumnFamily.java +++ b/engine/src/main/java/io/camunda/zeebe/process/test/engine/db/InMemoryDbColumnFamily.java @@ -140,6 +140,14 @@ public void whileEqualPrefix( whileEqualPrefix(context, keyPrefix, keyInstance, valueInstance, visitor); } + @Override + public void whileEqualPrefix( + final DbKey keyPrefix, + final KeyType startAtKey, + final KeyValuePairVisitor visitor) { + whileEqualPrefix(context, startAtKey, keyPrefix, keyInstance, valueInstance, visitor); + } + @Override public void deleteExisting(final KeyType key) { ensureInOpenTransaction(