diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index defb763e..5d2ca536 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -97,7 +97,7 @@ jobs:
uses: actions/upload-artifact@v4
if: always()
with:
- name: cloud-core-test-results
+ name: cloud-engine-test-results
path: "**/target/surefire-reports/**"
retention-days: 3
exporter:
diff --git a/core/src/test/java/io/zeebe/containers/examples/archive/RestartWithExtractedDataExampleTest.java b/core/src/test/java/io/zeebe/containers/examples/archive/RestartWithExtractedDataExampleTest.java
index 74969884..2bafb255 100644
--- a/core/src/test/java/io/zeebe/containers/examples/archive/RestartWithExtractedDataExampleTest.java
+++ b/core/src/test/java/io/zeebe/containers/examples/archive/RestartWithExtractedDataExampleTest.java
@@ -82,7 +82,10 @@ void shouldGenerateData() throws IOException {
final Path destination = tempDir.resolve(DATA_DIR);
// when
- try (final ZeebeContainer container = new ZeebeContainer().withZeebeData(volume)) {
+ try (final ZeebeContainer container =
+ new ZeebeContainer()
+ .withCreateContainerCmdModifier(cmd -> cmd.withUser("1001:0"))
+ .withZeebeData(volume)) {
container.start();
deployProcess(container);
}
@@ -110,6 +113,7 @@ void shouldRestartWithGeneratedData() {
// when
try (final ZeebeContainer container =
new ZeebeContainer()
+ .withCreateContainerCmdModifier(cmd -> cmd.withUser("1001:0"))
.withCopyFileToContainer(
MountableFile.forHostPath(dataPath),
ZeebeDefaults.getInstance().getDefaultDataPath())) {
@@ -130,7 +134,7 @@ private void deployProcess(final ZeebeContainer container) {
.gatewayAddress(container.getExternalGatewayAddress())
.build()) {
client
- .newDeployCommand()
+ .newDeployResourceCommand()
.addProcessModel(
Bpmn.createExecutableProcess(PROCESS_ID).startEvent().endEvent().done(),
"process.bpmn")
diff --git a/engine/pom.xml b/engine/pom.xml
index d09aedad..2bc02d46 100644
--- a/engine/pom.xml
+++ b/engine/pom.xml
@@ -78,6 +78,11 @@
testcontainers
+
+ com.fasterxml.jackson.core
+ jackson-databind
+
+
diff --git a/engine/src/main/java/io/zeebe/containers/engine/ZeebeClusterEngine.java b/engine/src/main/java/io/zeebe/containers/engine/ZeebeClusterEngine.java
index 5664252b..ce216652 100644
--- a/engine/src/main/java/io/zeebe/containers/engine/ZeebeClusterEngine.java
+++ b/engine/src/main/java/io/zeebe/containers/engine/ZeebeClusterEngine.java
@@ -15,7 +15,10 @@
*/
package io.zeebe.containers.engine;
+import com.fasterxml.jackson.databind.ObjectMapper;
import io.camunda.zeebe.client.ZeebeClient;
+import io.camunda.zeebe.client.ZeebeClientBuilder;
+import io.camunda.zeebe.client.impl.ZeebeObjectMapper;
import io.camunda.zeebe.process.test.api.RecordStreamSource;
import io.zeebe.containers.ZeebeNode;
import io.zeebe.containers.clock.ZeebeClock;
@@ -25,6 +28,7 @@
import java.util.Collection;
import java.util.List;
import java.util.concurrent.TimeoutException;
+import java.util.function.UnaryOperator;
import org.agrona.CloseHelper;
import org.apiguardian.api.API;
import org.apiguardian.api.API.Status;
@@ -65,10 +69,12 @@ public RecordStreamSource getRecordStreamSource() {
@Override
public ZeebeClient createClient() {
- final ZeebeClient client = cluster.newClientBuilder().build();
- clients.add(client);
+ return createClient(UnaryOperator.identity());
+ }
- return client;
+ @Override
+ public ZeebeClient createClient(final ObjectMapper customObjectMapper) {
+ return createClient(b -> b.withJsonMapper(new ZeebeObjectMapper(customObjectMapper)));
}
@Override
@@ -106,4 +112,14 @@ public void stop() {
CloseHelper.closeAll(cluster, recordStream);
}
+
+ private ZeebeClient createClient(final UnaryOperator configurator) {
+ final ZeebeClientBuilder builder =
+ configurator.apply(
+ ZeebeClient.newClientBuilder().usePlaintext().gatewayAddress(getGatewayAddress()));
+ final ZeebeClient client = builder.build();
+ clients.add(client);
+
+ return client;
+ }
}
diff --git a/engine/src/main/java/io/zeebe/containers/engine/ZeebeContainerEngine.java b/engine/src/main/java/io/zeebe/containers/engine/ZeebeContainerEngine.java
index 9f9e0df1..3893fef8 100644
--- a/engine/src/main/java/io/zeebe/containers/engine/ZeebeContainerEngine.java
+++ b/engine/src/main/java/io/zeebe/containers/engine/ZeebeContainerEngine.java
@@ -15,7 +15,10 @@
*/
package io.zeebe.containers.engine;
+import com.fasterxml.jackson.databind.ObjectMapper;
import io.camunda.zeebe.client.ZeebeClient;
+import io.camunda.zeebe.client.ZeebeClientBuilder;
+import io.camunda.zeebe.client.impl.ZeebeObjectMapper;
import io.camunda.zeebe.process.test.api.RecordStreamSource;
import io.zeebe.containers.ZeebeBrokerNode;
import io.zeebe.containers.ZeebeContainer;
@@ -26,6 +29,7 @@
import java.util.Collections;
import java.util.List;
import java.util.concurrent.TimeoutException;
+import java.util.function.UnaryOperator;
import org.agrona.CloseHelper;
import org.apiguardian.api.API;
import org.apiguardian.api.API.Status;
@@ -63,11 +67,12 @@ public RecordStreamSource getRecordStreamSource() {
@Override
public ZeebeClient createClient() {
- final ZeebeClient client =
- ZeebeClient.newClientBuilder().usePlaintext().gatewayAddress(getGatewayAddress()).build();
- clients.add(client);
+ return createClient(UnaryOperator.identity());
+ }
- return client;
+ @Override
+ public ZeebeClient createClient(final ObjectMapper objectMapper) {
+ return createClient(b -> b.withJsonMapper(new ZeebeObjectMapper(objectMapper)));
}
@Override
@@ -105,4 +110,14 @@ public void stop() {
CloseHelper.closeAll(container, recordStream);
}
+
+ private ZeebeClient createClient(final UnaryOperator configurator) {
+ final ZeebeClientBuilder builder =
+ configurator.apply(
+ ZeebeClient.newClientBuilder().usePlaintext().gatewayAddress(getGatewayAddress()));
+ final ZeebeClient client = builder.build();
+ clients.add(client);
+
+ return client;
+ }
}
diff --git a/pom.xml b/pom.xml
index 09868243..005a7a8e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -77,7 +77,7 @@
2.0.1
1.19.0
2.35.1
- 8.2.13
+ 8.3.4
3.3.1