From a6c72af7394d295a82619507e126d353c616cb9d Mon Sep 17 00:00:00 2001 From: Nicolas Pepin-Perreault Date: Wed, 7 Feb 2024 21:39:45 +0100 Subject: [PATCH 1/3] deps: bump zeebe --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 33f4fa0b..41b7fb60 100644 --- a/pom.xml +++ b/pom.xml @@ -89,7 +89,7 @@ 2.2 6.1.1 1.19.3 - 8.4.1 + 8.4.2 com/mycila/maven/plugin/license/templates/APACHE-2.txt From c6f8e91b96a9ba06b8a72e3cbb46c34ddcac771a Mon Sep 17 00:00:00 2001 From: Nicolas Pepin-Perreault Date: Wed, 7 Feb 2024 21:41:02 +0100 Subject: [PATCH 2/3] fix: fix update using EnumValue --- .../process/test/engine/db/InMemoryDb.java | 3 ++- .../test/engine/db/InMemoryDbFactory.java | 8 ++----- .../db/InMemoryZeebeDbTransactionTest.java | 22 ++++++++++++++----- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/engine/src/main/java/io/camunda/zeebe/process/test/engine/db/InMemoryDb.java b/engine/src/main/java/io/camunda/zeebe/process/test/engine/db/InMemoryDb.java index ab7c64da..0a5a3b31 100644 --- a/engine/src/main/java/io/camunda/zeebe/process/test/engine/db/InMemoryDb.java +++ b/engine/src/main/java/io/camunda/zeebe/process/test/engine/db/InMemoryDb.java @@ -9,6 +9,7 @@ import io.camunda.zeebe.db.*; import io.camunda.zeebe.db.impl.DbNil; +import io.camunda.zeebe.protocol.EnumValue; import java.io.File; import java.util.Optional; import java.util.TreeMap; @@ -28,7 +29,7 @@ * * @param */ -final class InMemoryDb> +final class InMemoryDb & EnumValue> implements ZeebeDb { private final TreeMap database = new TreeMap<>(); diff --git a/engine/src/main/java/io/camunda/zeebe/process/test/engine/db/InMemoryDbFactory.java b/engine/src/main/java/io/camunda/zeebe/process/test/engine/db/InMemoryDbFactory.java index 8de2ce73..dfccba01 100644 --- a/engine/src/main/java/io/camunda/zeebe/process/test/engine/db/InMemoryDbFactory.java +++ b/engine/src/main/java/io/camunda/zeebe/process/test/engine/db/InMemoryDbFactory.java @@ -9,9 +9,10 @@ import io.camunda.zeebe.db.ZeebeDb; import io.camunda.zeebe.db.ZeebeDbFactory; +import io.camunda.zeebe.protocol.EnumValue; import java.io.File; -public class InMemoryDbFactory> +public class InMemoryDbFactory & EnumValue> implements ZeebeDbFactory { public ZeebeDb createDb() { @@ -22,9 +23,4 @@ public ZeebeDb createDb() { public ZeebeDb createDb(final File pathName) { return new InMemoryDb<>(); } - - @Override - public ZeebeDb openSnapshotOnlyDb(final File path) { - throw new UnsupportedOperationException("Snapshots are not supported with in-memory databases"); - } } diff --git a/engine/src/test/java/io/camunda/zeebe/process/test/engine/db/InMemoryZeebeDbTransactionTest.java b/engine/src/test/java/io/camunda/zeebe/process/test/engine/db/InMemoryZeebeDbTransactionTest.java index 51a43580..3d15101d 100644 --- a/engine/src/test/java/io/camunda/zeebe/process/test/engine/db/InMemoryZeebeDbTransactionTest.java +++ b/engine/src/test/java/io/camunda/zeebe/process/test/engine/db/InMemoryZeebeDbTransactionTest.java @@ -15,6 +15,7 @@ import io.camunda.zeebe.db.ZeebeDb; import io.camunda.zeebe.db.ZeebeDbTransaction; import io.camunda.zeebe.db.impl.DbLong; +import io.camunda.zeebe.protocol.EnumValue; import java.util.HashMap; import java.util.Map; import java.util.concurrent.atomic.AtomicLong; @@ -512,10 +513,21 @@ void shouldNotIterateOverDeletionsInTransaction() throws Exception { }); } - private enum ColumnFamilies { - DEFAULT, // rocksDB needs a default column family - ONE, - TWO, - THREE + private enum ColumnFamilies implements EnumValue { + DEFAULT(0), // rocksDB needs a default column family + ONE(1), + TWO(2), + THREE(3); + + private final int value; + + ColumnFamilies(final int value) { + this.value = value; + } + + @Override + public int getValue() { + return value; + } } } From 73305566c50fd4550a14f0e3d1a92d0c6c439593 Mon Sep 17 00:00:00 2001 From: Nicolas Pepin-Perreault Date: Wed, 7 Feb 2024 22:02:02 +0100 Subject: [PATCH 3/3] fix: fix integration issues --- .../zeebe/process/test/engine/db/InMemoryDbFactory.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engine/src/main/java/io/camunda/zeebe/process/test/engine/db/InMemoryDbFactory.java b/engine/src/main/java/io/camunda/zeebe/process/test/engine/db/InMemoryDbFactory.java index dfccba01..474b721b 100644 --- a/engine/src/main/java/io/camunda/zeebe/process/test/engine/db/InMemoryDbFactory.java +++ b/engine/src/main/java/io/camunda/zeebe/process/test/engine/db/InMemoryDbFactory.java @@ -23,4 +23,9 @@ public ZeebeDb createDb() { public ZeebeDb createDb(final File pathName) { return new InMemoryDb<>(); } + + @Override + public ZeebeDb openSnapshotOnlyDb(final File path) { + throw new UnsupportedOperationException("Snapshots are not supported with in-memory databases"); + } }