Skip to content

Commit

Permalink
Merge pull request #600 from camunda-community-hub/dependabot/maven/m…
Browse files Browse the repository at this point in the history
…ain/version.zeebe-8.3.4

deps: bump version.zeebe from 8.2.13 to 8.3.4
  • Loading branch information
npepinpe authored Dec 20, 2023
2 parents e589303 + 71849eb commit 54eb0e9
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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())) {
Expand All @@ -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")
Expand Down
5 changes: 5 additions & 0 deletions engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@
<artifactId>testcontainers</artifactId>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>

<!-- Test dependencies -->

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -106,4 +112,14 @@ public void stop() {

CloseHelper.closeAll(cluster, recordStream);
}

private ZeebeClient createClient(final UnaryOperator<ZeebeClientBuilder> configurator) {
final ZeebeClientBuilder builder =
configurator.apply(
ZeebeClient.newClientBuilder().usePlaintext().gatewayAddress(getGatewayAddress()));
final ZeebeClient client = builder.build();
clients.add(client);

return client;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -105,4 +110,14 @@ public void stop() {

CloseHelper.closeAll(container, recordStream);
}

private ZeebeClient createClient(final UnaryOperator<ZeebeClientBuilder> configurator) {
final ZeebeClientBuilder builder =
configurator.apply(
ZeebeClient.newClientBuilder().usePlaintext().gatewayAddress(getGatewayAddress()));
final ZeebeClient client = builder.build();
clients.add(client);

return client;
}
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<version.slf4j>2.0.1</version.slf4j>
<version.testcontainers>1.19.3</version.testcontainers>
<version.wiremock>2.35.1</version.wiremock>
<version.zeebe>8.2.13</version.zeebe>
<version.zeebe>8.3.4</version.zeebe>

<!-- plugin version -->
<plugin.version.checkstyle>3.3.1</plugin.version.checkstyle>
Expand Down

0 comments on commit 54eb0e9

Please sign in to comment.