Annotation Interface OnlyRunWhen
If the backing service is not selected the test class will be entirely skipped, including all test methods and any setup/teardown methods.
Any @Inject
annotated fields will not be injected if the test class is skipped, allowing you to inject
backing services that are only available in certain environments without causing test failures in other
environments.
When using this annotation, the test class must use a Saga test runner, e.g.
FullFlowExtensionIntegrationRunner
or FullFlowExtensionComponentRunner
.
If multiple of a single type of backing service is specified on the test class, the test will run if any of the specified backing services are selected.
If multiple different types of backing services are specified on the test class, the test will only run if all the specified backing services are selected.
Specifying an empty array for any of the backing service types will cause the test to run regardless of the availability of that backing service type.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionboolean
-
Element Details
-
unboundedStorageType
BackingServiceTypes.UnboundedStorageType[] unboundedStorageType- Returns:
- the unbounded storage types that must be selected for the test to run
- Default:
- {}
-
boundedStorageType
BackingServiceTypes.BoundedStorageType[] boundedStorageType- Returns:
- the bounded storage types that must be selected for the test to run
- Default:
- {}
-
indexType
BackingServiceTypes.IndexType[] indexType- Returns:
- the index types that must be selected for the test to run
- Default:
- {}
-
queueingType
BackingServiceTypes.QueueingType[] queueingType- Returns:
- the queueing types that must be selected for the test to run
- Default:
- {}
-
coordinatorType
BackingServiceTypes.CoordinatorType[] coordinatorType- Returns:
- the coordinator types that must be selected for the test to run
- Default:
- {}
-
sqlVendor
DialectType[] sqlVendor- Returns:
- the SQL vendors that must be selected for the test to run
- Default:
- {}
-
sqlOnly
boolean sqlOnly- Returns:
- true if the test should only run in SQL_ONLY mode
- Default:
- false
-