Interface TestGateway<T extends TestGateway<T>>

Type Parameters:
T - the concrete type of the implementation
All Superinterfaces:
AutoCloseable, TestApplication<T>
All Known Implementing Classes:
TestStandaloneBroker, TestStandaloneGateway

public interface TestGateway<T extends TestGateway<T>> extends TestApplication<T>
Represents a Zeebe gateway, either standalone or embedded.
  • Method Details

    • grpcAddress

      default URI grpcAddress()
      Returns the address used by clients to interact with the gateway.

      You can build your client like this:

      @{code
         ZeebeClient.newClientBuilder()
           .gatewayAddress(gateway.gatewayAddress())
           .usePlaintext()
           .build();
       }
      Returns:
      the address for the gRPC gateway
    • restAddress

      default URI restAddress()
      Returns the address used by clients to interact with the gateway.

      You can build your client like this:

      @{code
          ZeebeClient.newClientBuilder()
            .restAddress(gateway.restAddress())
            .usePlaintext()
            .build();
        }
      Returns:
      the REST gateway address
    • gatewayHealth

      default GatewayHealthActuator gatewayHealth()
      Returns the health actuator for this gateway. You can use this to check for liveness, readiness, and startup.
    • healthActuator

      default HealthActuator healthActuator()
      Description copied from interface: TestApplication
      Returns the default health actuator for this application.
      Specified by:
      healthActuator in interface TestApplication<T extends TestGateway<T>>
    • isGateway

      default boolean isGateway()
      Description copied from interface: TestApplication
      Returns true if this node can act as a gateway (e.g. broker with embedded gateway)
      Specified by:
      isGateway in interface TestApplication<T extends TestGateway<T>>
    • withGatewayConfig

      T withGatewayConfig(Consumer<GatewayCfg> modifier)
      Allows modifying the gateway configuration. Changes will not take effect until the node is restarted.
    • gatewayConfig

      GatewayCfg gatewayConfig()
      Returns the gateway configuration for this node.
    • newClientBuilder

      default ZeebeClientBuilder newClientBuilder()
      Returns a new pre-configured client builder for this gateway
    • awaitCompleteTopology

      default T awaitCompleteTopology(int clusterSize, int partitionCount, int replicationFactor, Duration timeout)
      Blocks until the topology is complete. See TopologyAssert.isComplete(int, int, int) for semantics.
      Returns:
      itself for chaining
      See Also:
    • awaitCompleteTopology

      default T awaitCompleteTopology()
      Convenience method to await complete topology of single node clusters.
      Returns:
      itself for chaining