Package io.camunda.zeebe.qa.util.cluster
Class TestRestoreApp
java.lang.Object
io.camunda.zeebe.qa.util.cluster.TestRestoreApp
- All Implemented Interfaces:
TestApplication<TestRestoreApp>,AutoCloseable
Represents an instance of the
RestoreApp Spring application.-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescription<V> VIf the application is started (e.g.protected String[]Returns the command line arguments that will be passed when the application is started.protected org.springframework.boot.builder.SpringApplicationBuilderReturns a builder which can be modified to enable more profiles, inject beans, etc.Returns the default health actuator for this application.booleanReturns true if this node can act as a gateway (e.g.booleanReturns whether the underlying application is started yet; does not include any probesintmappedPort(TestZeebePort port) Returns the actual port for the given logical port.nodeId()Returns this node's unique cluster ID<V> VIf the application is started (e.g.self()Convenience method to return the appropriate concrete typestart()Starts the node in a blocking fashion.stop()Attempts to stop the container gracefully in a blocking fashion.toString()withAdditionalProfile(String profile) Configures additional active Spring profiles.withBackupId(long backupId) <V> TestRestoreAppWhen the underlying application is started, all beans of the given type will resolve to the given value.withBrokerConfig(Consumer<BrokerCfg> modifier) withProperty(String key, Object value) Configures Spring via properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.camunda.zeebe.qa.util.cluster.TestApplication
actuatorUri, address, address, await, await, close, host, monitoringUri, probe, uri, uri, withAdditionalProfile
-
Constructor Details
-
TestRestoreApp
public TestRestoreApp()
-
-
Method Details
-
self
Description copied from interface:TestApplicationConvenience method to return the appropriate concrete type -
nodeId
Description copied from interface:TestApplicationReturns this node's unique cluster ID -
healthActuator
Description copied from interface:TestApplicationReturns the default health actuator for this application. -
isGateway
public boolean isGateway()Description copied from interface:TestApplicationReturns true if this node can act as a gateway (e.g. broker with embedded gateway) -
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
-
withBackupId
-
start
Description copied from interface:TestApplicationStarts the node in a blocking fashion.- Specified by:
startin interfaceTestApplication<T extends io.camunda.zeebe.qa.util.cluster.TestSpringApplication<T>>
-
stop
Description copied from interface:TestApplicationAttempts to stop the container gracefully in a blocking fashion.- Specified by:
stopin interfaceTestApplication<T extends io.camunda.zeebe.qa.util.cluster.TestSpringApplication<T>>
-
isStarted
public boolean isStarted()Description copied from interface:TestApplicationReturns whether the underlying application is started yet; does not include any probes- Specified by:
isStartedin interfaceTestApplication<T extends io.camunda.zeebe.qa.util.cluster.TestSpringApplication<T>>
-
withBean
Description copied from interface:TestApplicationWhen 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:
withBeanin interfaceTestApplication<T extends io.camunda.zeebe.qa.util.cluster.TestSpringApplication<T>>- Type Parameters:
V- the bean type- Parameters:
qualifier- the bean name/qualifierbean- the object to inject as the bean valuetype- the type to be resolved/autowired- Returns:
- itself for chaining
-
mappedPort
Description copied from interface:TestApplicationReturns the actual port for the given logical port.- Specified by:
mappedPortin interfaceTestApplication<T extends io.camunda.zeebe.qa.util.cluster.TestSpringApplication<T>>
-
bean
Description copied from interface:TestApplicationIf the application is started (e.g.TestApplication.isStarted(), resolves and returns (i.e. auto-wires) the first bean of the given type.- Specified by:
beanin interfaceTestApplication<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
Description copied from interface:TestApplicationIf 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:
propertyin interfaceTestApplication<T extends io.camunda.zeebe.qa.util.cluster.TestSpringApplication<T>>- Type Parameters:
V- the expected property type type- Parameters:
property- the key identifying this propertytype- the expected type of the property valuefallback- a default value if the property is not set- Returns:
- the value of this (if any was resolved), or the fallback value
-
withProperty
Description copied from interface:TestApplicationConfigures Spring via properties. This does not work with properties that would be applied to injected beans (e.g. viaTestApplication.withBean(String, Object, Class)), since there will be property resolution for these beans.- Specified by:
withPropertyin interfaceTestApplication<T extends io.camunda.zeebe.qa.util.cluster.TestSpringApplication<T>>- Parameters:
key- the property keyvalue- the new value- Returns:
- itself for chaining
-
withAdditionalProfile
Description copied from interface:TestApplicationConfigures additional active Spring profiles.- Specified by:
withAdditionalProfilein interfaceTestApplication<T extends io.camunda.zeebe.qa.util.cluster.TestSpringApplication<T>>- Parameters:
profile- the profile ID- Returns:
- itself for chaining
-
toString
-