Class TestRestoreApp

java.lang.Object
io.camunda.zeebe.qa.util.cluster.TestRestoreApp
All Implemented Interfaces:
TestApplication<TestRestoreApp>, AutoCloseable

public final class TestRestoreApp extends Object
Represents an instance of the RestoreApp Spring application.
  • Constructor Details

  • Method Details

    • self

      public TestRestoreApp self()
      Description copied from interface: TestApplication
      Convenience method to return the appropriate concrete type
    • nodeId

      public MemberId nodeId()
      Description copied from interface: TestApplication
      Returns this node's unique cluster ID
    • healthActuator

      public HealthActuator healthActuator()
      Description copied from interface: TestApplication
      Returns the default health actuator for this application.
    • isGateway

      public boolean isGateway()
      Description copied from interface: TestApplication
      Returns true if this node can act as a gateway (e.g. broker with embedded gateway)
    • commandLineArgs

      protected String[] commandLineArgs()
      Returns the command line arguments that will be passed when the application is started.
    • createSpringBuilder

      protected org.springframework.boot.builder.SpringApplicationBuilder createSpringBuilder()
      Returns a builder which can be modified to enable more profiles, inject beans, etc. Sub-classes can override this to customize the behavior of the test application.
    • withBrokerConfig

      public TestRestoreApp withBrokerConfig(Consumer<BrokerCfg> modifier)
    • withBackupId

      public TestRestoreApp withBackupId(long backupId)
    • start

      public TestRestoreApp start()
      Description copied from interface: TestApplication
      Starts the node in a blocking fashion.
      Specified by:
      start in interface TestApplication<T extends io.camunda.zeebe.qa.util.cluster.TestSpringApplication<T>>
    • stop

      public TestRestoreApp stop()
      Description copied from interface: TestApplication
      Attempts to stop the container gracefully in a blocking fashion.
      Specified by:
      stop in interface TestApplication<T extends io.camunda.zeebe.qa.util.cluster.TestSpringApplication<T>>
    • isStarted

      public boolean isStarted()
      Description copied from interface: TestApplication
      Returns whether the underlying application is started yet; does not include any probes
      Specified by:
      isStarted in interface TestApplication<T extends io.camunda.zeebe.qa.util.cluster.TestSpringApplication<T>>
    • withBean

      public <V> TestRestoreApp withBean(String qualifier, V bean, Class<V> type)
      Description copied from interface: TestApplication
      When the underlying application is started, all beans of the given type will resolve to the given value. The qualifier is useful for cases where more than one beans of the same type are defined with different qualifiers.
      Specified by:
      withBean in interface TestApplication<T extends io.camunda.zeebe.qa.util.cluster.TestSpringApplication<T>>
      Type Parameters:
      V - the bean type
      Parameters:
      qualifier - the bean name/qualifier
      bean - the object to inject as the bean value
      type - the type to be resolved/autowired
      Returns:
      itself for chaining
    • mappedPort

      public int mappedPort(TestZeebePort port)
      Description copied from interface: TestApplication
      Returns the actual port for the given logical port.
      Specified by:
      mappedPort in interface TestApplication<T extends io.camunda.zeebe.qa.util.cluster.TestSpringApplication<T>>
    • bean

      public <V> V bean(Class<V> type)
      Description copied from interface: TestApplication
      If the application is started (e.g. TestApplication.isStarted(), resolves and returns (i.e. auto-wires) the first bean of the given type.
      Specified by:
      bean in interface TestApplication<T extends io.camunda.zeebe.qa.util.cluster.TestSpringApplication<T>>
      Type Parameters:
      V - the expected bean type
      Parameters:
      type - the expected bean type
      Returns:
      the bean (if any was resolved), or null
    • property

      public <V> V property(String property, Class<V> type, V fallback)
      Description copied from interface: TestApplication
      If the application is started (e.g. TestApplication.isStarted(), resolves and returns the value for this property, or a given fallback if there was none set. If the application is not started, it will look it up only in the property overrides (e.g. TestApplication.withProperty(String, Object).
      Specified by:
      property in interface TestApplication<T extends io.camunda.zeebe.qa.util.cluster.TestSpringApplication<T>>
      Type Parameters:
      V - the expected property type type
      Parameters:
      property - the key identifying this property
      type - the expected type of the property value
      fallback - a default value if the property is not set
      Returns:
      the value of this (if any was resolved), or the fallback value
    • withProperty

      public TestRestoreApp withProperty(String key, Object value)
      Description copied from interface: TestApplication
      Configures Spring via properties. This does not work with properties that would be applied to injected beans (e.g. via TestApplication.withBean(String, Object, Class)), since there will be property resolution for these beans.
      Specified by:
      withProperty in interface TestApplication<T extends io.camunda.zeebe.qa.util.cluster.TestSpringApplication<T>>
      Parameters:
      key - the property key
      value - the new value
      Returns:
      itself for chaining
    • withAdditionalProfile

      public TestRestoreApp withAdditionalProfile(String profile)
      Description copied from interface: TestApplication
      Configures additional active Spring profiles.
      Specified by:
      withAdditionalProfile in interface TestApplication<T extends io.camunda.zeebe.qa.util.cluster.TestSpringApplication<T>>
      Parameters:
      profile - the profile ID
      Returns:
      itself for chaining
    • toString

      public String toString()
      Overrides:
      toString in class Object