Interface ContainerEngine

All Superinterfaces:
AutoCloseable, org.testcontainers.lifecycle.Startable, io.camunda.zeebe.process.test.api.ZeebeTestEngine

@API(status=EXPERIMENTAL) public interface ContainerEngine extends org.testcontainers.lifecycle.Startable, io.camunda.zeebe.process.test.api.ZeebeTestEngine
A ContainerEngine is a ZeebeTestEngine implementation which wraps a container or a set of containers.

You can use the provided ContainerEngine.Builder interface (via builder() to build a custom engine.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    A helper class to build ContainerEngine instances.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    acknowledge(int partitionId, long position)
    Marks all records with a position less than position on partition with ID partitionId as acknowledged, meaning they can now be deleted from Zeebe.
    Returns a default builder.
    Creates a ContainerEngine with a default ZeebeContainer, an idle period of 1 second, a grace period of 0, and auto acknowledging all records.

    Methods inherited from interface org.testcontainers.lifecycle.Startable

    close, getDependencies, start, stop

    Methods inherited from interface io.camunda.zeebe.process.test.api.ZeebeTestEngine

    createClient, createClient, getGatewayAddress, getRecordStreamSource, increaseTime, start, stop, waitForBusyState, waitForIdleState
  • Method Details

    • builder

      static ContainerEngine.Builder builder()
      Returns a default builder. Calling ContainerEngine.Builder.build() on a fresh builder will return a builder wrapping a default ZeebeContainer, with an idle period of 1 second.
      Returns:
      a new ContainerEngine.Builder instance
    • createDefault

      static ContainerEngine createDefault()
      Creates a ContainerEngine with a default ZeebeContainer, an idle period of 1 second, a grace period of 0, and auto acknowledging all records.
      Returns:
      a new, default container engine
    • acknowledge

      void acknowledge(int partitionId, long position)
      Marks all records with a position less than position on partition with ID partitionId as acknowledged, meaning they can now be deleted from Zeebe.

      Note that this is not a synchronous operation, but instead will take effect when the next record is exported. See DebugReceiver.acknowledge(int, long) for more.

      Parameters:
      partitionId - the ID of the partition on which to acknowledge
      position - the position up to which they should be acknowledged