diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 20e98fe9..4ccdfa9e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,10 +13,10 @@ jobs: artifacts_archive_path: ${{ steps.release.outputs.artifacts_archive_path }} steps: - uses: actions/checkout@v4 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v3 with: - java-version: '17' + java-version: '21' distribution: 'temurin' cache: 'maven' gpg-private-key: ${{ secrets.MAVEN_CENTRAL_GPG_SIGNING_KEY_SEC }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1eacc253..5469134d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,10 +14,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v3 with: - java-version: '17' + java-version: '21' distribution: 'temurin' cache: 'maven' - name: Check @@ -32,11 +32,11 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v3.3.0 with: distribution: 'temurin' - java-version: '17' + java-version: '21' cache: 'maven' - name: Initialize CodeQL uses: github/codeql-action/init@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7111c785..bfaa71ad 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: - name: Setup Java uses: actions/setup-java@v3 with: - java-version: '17' + java-version: '21' distribution: 'temurin' cache: 'maven' - name: Build & Copy exporter @@ -45,10 +45,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Setup JDK 17 + - name: Setup JDK 21 uses: actions/setup-java@v3 with: - java-version: '17' + java-version: '21' distribution: 'temurin' cache: 'maven' - name: Build & Copy exporter @@ -80,10 +80,10 @@ jobs: ./agent & ./agent wait - uses: actions/checkout@v4 - - name: Setup JDK 17 + - name: Setup JDK 21 uses: actions/setup-java@v3 with: - java-version: '17' + java-version: '21' distribution: 'temurin' cache: 'maven' - name: Build & Copy exporter @@ -105,10 +105,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v3 with: - java-version: '17' + java-version: '21' distribution: 'temurin' cache: 'maven' - name: Build diff --git a/README.md b/README.md index 36902279..704ee8fb 100644 --- a/README.md +++ b/README.md @@ -115,8 +115,8 @@ testImplementation 'io.zeebe:zeebe-test-container:3.5.0' Zeebe Test Container is built for Java 8+, and will not work on lower Java versions. -> You will need Java 17+ for development purposes, however, as many of our tests rely on shared -> Zeebe libraries which are built for Java 17+. +> You will need Java 21+ for development purposes, however, as many of our tests rely on shared +> Zeebe libraries which are built for Java 21+. Additionally, you will need to comply with all the Testcontainers requirements, as defined [here](https://www.testcontainers.org/#prerequisites). @@ -1178,7 +1178,7 @@ you will need to sign the [Contributor License Agreement](https://cla-assistant. In order to build from source, you will need to install maven 3.6+. You can find more about it on the [maven homepage](https://maven.apache.org/users/index.html). -To build the project, you will need a JDK 17 installed locally. Note however that the `core` and `engine` modules +To build the project, you will need a JDK 21 installed locally. Note however that the `core` and `engine` modules are targeting Java 8 for compatibility purposes, and we must ensure that we maintain compatibility. To do this, the CI pipeline will run the tests using Java 8. @@ -1194,7 +1194,7 @@ The library is split into three modules: - `engine`: the implementation of `ZeebeTestEngine`, the compatibility layer between this library and [Zeebe Process Test](https://github.com/camunda/zeebe-process-test). - `exporter`: the debug exporter module. It will be packaged as a fat JAR and included as a resource - in the core module. It has to be a separate module as it targets Java 17, same as the + in the core module. It has to be a separate module as it targets Java 21, same as the `zeebe-exporter-api` module it implements. - `exporter-test`: a module to test the integration between `DebugReceiver` and `DebugExporter`, without having to run everything through an actual broker. @@ -1229,6 +1229,10 @@ Testing is done via GitHub actions, using two workflows: tests which need to run on the local job should be annotated with `@DisabledIfTestcontainersCloud`. +One important thing to note is that we package and copy the debug exporter into the core module +during the build process. This means that any tests which relies on the debug exporter being +accessible has to be an integration test run by failsafe (i.e. test files ending with `IT`). + ## Code style The project uses Spotless to apply consistent formatting and licensing to all project files. By diff --git a/core/pom.xml b/core/pom.xml index 566a10e8..180c9232 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -201,8 +201,7 @@ copy - - generate-resources + package @@ -221,6 +220,11 @@ + + org.apache.maven.plugins + maven-failsafe-plugin + + org.revapi revapi-maven-plugin diff --git a/core/src/test/java/io/zeebe/containers/examples/exporter/BrokerWithDebugExporterTest.java b/core/src/test/java/io/zeebe/containers/examples/exporter/BrokerWithDebugExporterIT.java similarity index 98% rename from core/src/test/java/io/zeebe/containers/examples/exporter/BrokerWithDebugExporterTest.java rename to core/src/test/java/io/zeebe/containers/examples/exporter/BrokerWithDebugExporterIT.java index 130230ce..824e6883 100644 --- a/core/src/test/java/io/zeebe/containers/examples/exporter/BrokerWithDebugExporterTest.java +++ b/core/src/test/java/io/zeebe/containers/examples/exporter/BrokerWithDebugExporterIT.java @@ -51,7 +51,7 @@ * io.zeebe.containers.ZeebeBrokerNode#withDebugExporter(int)}. */ @Testcontainers -final class BrokerWithDebugExporterTest { +final class BrokerWithDebugExporterIT { private final List> records = new CopyOnWriteArrayList<>(); private final DebugReceiver receiver = new DebugReceiver(records::add).start(); diff --git a/engine/pom.xml b/engine/pom.xml index db0c244a..d09aedad 100644 --- a/engine/pom.xml +++ b/engine/pom.xml @@ -113,6 +113,11 @@ + + org.apache.maven.plugins + maven-failsafe-plugin + + org.revapi revapi-maven-plugin diff --git a/engine/src/test/java/io/zeebe/containers/engine/DebugReceiverStreamTest.java b/engine/src/test/java/io/zeebe/containers/engine/DebugReceiverStreamIT.java similarity index 99% rename from engine/src/test/java/io/zeebe/containers/engine/DebugReceiverStreamTest.java rename to engine/src/test/java/io/zeebe/containers/engine/DebugReceiverStreamIT.java index 1b8a1c8d..4c78673c 100644 --- a/engine/src/test/java/io/zeebe/containers/engine/DebugReceiverStreamTest.java +++ b/engine/src/test/java/io/zeebe/containers/engine/DebugReceiverStreamIT.java @@ -39,7 +39,7 @@ import java.util.concurrent.TimeoutException; import org.junit.jupiter.api.Test; -final class DebugReceiverStreamTest { +final class DebugReceiverStreamIT { private final InfiniteList> records = new InfiniteList<>(); private final DebugReceiver receiver = new DebugReceiver(records::add); diff --git a/engine/src/test/java/io/zeebe/containers/engine/ZeebeClusterEngineTest.java b/engine/src/test/java/io/zeebe/containers/engine/ZeebeClusterEngineIT.java similarity index 99% rename from engine/src/test/java/io/zeebe/containers/engine/ZeebeClusterEngineTest.java rename to engine/src/test/java/io/zeebe/containers/engine/ZeebeClusterEngineIT.java index 43311c79..57207e55 100644 --- a/engine/src/test/java/io/zeebe/containers/engine/ZeebeClusterEngineTest.java +++ b/engine/src/test/java/io/zeebe/containers/engine/ZeebeClusterEngineIT.java @@ -49,7 +49,7 @@ import org.testcontainers.junit.jupiter.Testcontainers; @Testcontainers -final class ZeebeClusterEngineTest { +final class ZeebeClusterEngineIT { private final Network network = Network.newNetwork(); private final InfiniteList> records = new InfiniteList<>(); private final DebugReceiver receiver = new DebugReceiver(records::add); diff --git a/engine/src/test/java/io/zeebe/containers/engine/ZeebeContainerEngineTest.java b/engine/src/test/java/io/zeebe/containers/engine/ZeebeContainerEngineIT.java similarity index 99% rename from engine/src/test/java/io/zeebe/containers/engine/ZeebeContainerEngineTest.java rename to engine/src/test/java/io/zeebe/containers/engine/ZeebeContainerEngineIT.java index 10359a4f..d17dadb7 100644 --- a/engine/src/test/java/io/zeebe/containers/engine/ZeebeContainerEngineTest.java +++ b/engine/src/test/java/io/zeebe/containers/engine/ZeebeContainerEngineIT.java @@ -41,7 +41,7 @@ import org.testcontainers.junit.jupiter.Testcontainers; @Testcontainers -final class ZeebeContainerEngineTest { +final class ZeebeContainerEngineIT { private final InfiniteList> records = new InfiniteList<>(); private final DebugReceiver receiver = new DebugReceiver(records::add); private final DebugReceiverStream recordStream = new DebugReceiverStream(records, receiver); diff --git a/engine/src/test/java/io/zeebe/containers/engine/examples/ClusterEngineExampleTest.java b/engine/src/test/java/io/zeebe/containers/engine/examples/ClusterEngineExampleIT.java similarity index 98% rename from engine/src/test/java/io/zeebe/containers/engine/examples/ClusterEngineExampleTest.java rename to engine/src/test/java/io/zeebe/containers/engine/examples/ClusterEngineExampleIT.java index 9fe2a31f..8966c476 100644 --- a/engine/src/test/java/io/zeebe/containers/engine/examples/ClusterEngineExampleTest.java +++ b/engine/src/test/java/io/zeebe/containers/engine/examples/ClusterEngineExampleIT.java @@ -31,7 +31,7 @@ import org.testcontainers.junit.jupiter.Testcontainers; @Testcontainers -final class ClusterEngineExampleTest { +final class ClusterEngineExampleIT { private final Network network = Network.newNetwork(); // a container which will print out its log to the given logger diff --git a/engine/src/test/java/io/zeebe/containers/engine/examples/ContainerEngineExampleTest.java b/engine/src/test/java/io/zeebe/containers/engine/examples/ContainerEngineExampleIT.java similarity index 97% rename from engine/src/test/java/io/zeebe/containers/engine/examples/ContainerEngineExampleTest.java rename to engine/src/test/java/io/zeebe/containers/engine/examples/ContainerEngineExampleIT.java index 8c1881ce..36eaef3a 100644 --- a/engine/src/test/java/io/zeebe/containers/engine/examples/ContainerEngineExampleTest.java +++ b/engine/src/test/java/io/zeebe/containers/engine/examples/ContainerEngineExampleIT.java @@ -45,8 +45,8 @@ * href="https://github.com/camunda/zeebe-process-test">zeebe-process-test. */ @Testcontainers -final class ContainerEngineExampleTest { - private static final Logger LOGGER = LoggerFactory.getLogger(ContainerEngineExampleTest.class); +final class ContainerEngineExampleIT { + private static final Logger LOGGER = LoggerFactory.getLogger(ContainerEngineExampleIT.class); // a container which will print out its log to the given logger private final ZeebeContainer container = diff --git a/engine/src/test/java/io/zeebe/containers/engine/examples/GracePeriodExampleTest.java b/engine/src/test/java/io/zeebe/containers/engine/examples/GracePeriodExampleIT.java similarity index 98% rename from engine/src/test/java/io/zeebe/containers/engine/examples/GracePeriodExampleTest.java rename to engine/src/test/java/io/zeebe/containers/engine/examples/GracePeriodExampleIT.java index 8410f67f..0429afe5 100644 --- a/engine/src/test/java/io/zeebe/containers/engine/examples/GracePeriodExampleTest.java +++ b/engine/src/test/java/io/zeebe/containers/engine/examples/GracePeriodExampleIT.java @@ -37,7 +37,7 @@ * of the grace period, thus slowing down your tests. */ @Testcontainers -final class GracePeriodExampleTest { +final class GracePeriodExampleIT { @Container private final ContainerEngine engine = ContainerEngine.builder().withGracePeriod(Duration.ofSeconds(5)).build(); diff --git a/exporter-test/pom.xml b/exporter-test/pom.xml index 89db89d7..6e403906 100644 --- a/exporter-test/pom.xml +++ b/exporter-test/pom.xml @@ -14,8 +14,8 @@ Zeebe Test Container Exporter Tests - - 17 + + 21 diff --git a/exporter/pom.xml b/exporter/pom.xml index e2cbc5ec..dae62dcb 100644 --- a/exporter/pom.xml +++ b/exporter/pom.xml @@ -14,8 +14,8 @@ Zeebe Test Container Exporter - - 17 + + 21 diff --git a/pom.xml b/pom.xml index 6ccd68b8..09868243 100644 --- a/pom.xml +++ b/pom.xml @@ -34,7 +34,7 @@ - 17 + 21 https://artifacts.camunda.com/artifactory/zeebe-io-snapshots/ https://artifacts.camunda.com/artifactory/zeebe-io/ @@ -85,8 +85,9 @@ 3.11.0 3.6.0 3.4.1 + 3.2.2 1.5.0 - 1.15.0 + 1.17.0 3.1.0 3.3.0 3.6.2 @@ -370,6 +371,13 @@ slf4j-simple test + + + org.junit.jupiter + junit-jupiter + ${version.junit-jupiter} + test + @@ -545,6 +553,25 @@ + + + org.apache.maven.plugins + maven-failsafe-plugin + ${plugin.version.failsafe} + + false + false + true + + + + org.junit.jupiter + junit-jupiter-engine + ${version.junit-jupiter} + + + + org.apache.maven.plugins maven-clean-plugin @@ -583,6 +610,7 @@ org.slf4j:slf4j-simple + org.junit.jupiter:junit-jupiter @@ -768,22 +796,39 @@ 1C - - - org.apache.maven.plugins - maven-surefire-plugin - - ${forkCount} - true - - junit.jupiter.execution.parallel.enabled = true - junit.jupiter.execution.parallel.mode.default = concurrent - junit.jupiter.execution.parallel.config.strategy = fixed - junit.jupiter.execution.parallel.config.fixed.parallelism = 2 - - - - + + + + org.apache.maven.plugins + maven-surefire-plugin + + ${forkCount} + true + + junit.jupiter.execution.parallel.enabled = true + junit.jupiter.execution.parallel.mode.default = concurrent + junit.jupiter.execution.parallel.config.strategy = fixed + junit.jupiter.execution.parallel.config.fixed.parallelism = 2 + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + ${forkCount} + true + + junit.jupiter.execution.parallel.enabled = true + junit.jupiter.execution.parallel.mode.default = concurrent + junit.jupiter.execution.parallel.config.strategy = fixed + junit.jupiter.execution.parallel.config.fixed.parallelism = 2 + + + + +