Class ConformanceRunner.Builder
java.lang.Object
codes.grow.packages.vault.testing.ConformanceRunner.Builder
- Enclosing class:
ConformanceRunner
Builder for
ConformanceRunner.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the runner.capabilities(String... caps) Declares capabilities of the target (write,delete,versions,query,version, ...).Restricts the run to these scenario ids.Registers one operation.Repeats a failing step ofopuntil its expectation passes ortimeout(or the step'stimeoutMsargument) runs out, for eventually consistent backends.pollInterval(Duration interval) Sets the pause between repeated steps (defaultConformanceRunner.DEFAULT_POLL_INTERVAL).Sets the${prefix}template (may contain${run}).register(ConformanceOps categoryOps) Registers (or overrides) operations of a category.scenarioDir(Path dir) Reads scenarios from this directory instead of searching forconformance/scenarios.serviceName(String serviceName) Sets${serviceName}(the tracing service name the factory configured).target(String category, TargetFactory factory) Sets the target factory of a category; categories without a target do not run.Sets an extra variable, e.g.
-
Method Details
-
scenarioDir
Reads scenarios from this directory instead of searching forconformance/scenarios.- Parameters:
dir- scenario directory- Returns:
- this builder
-
target
Sets the target factory of a category; categories without a target do not run.- Parameters:
category-core,secrets,loggingortracingfactory- creates the target per scenario- Returns:
- this builder
-
capabilities
Declares capabilities of the target (write,delete,versions,query,version, ...). Scenarios and steps requiring others are skipped.- Parameters:
caps- capability names- Returns:
- this builder
-
prefix
Sets the${prefix}template (may contain${run}).- Parameters:
prefix- prefix template, default "grow-conformance/${run}/"- Returns:
- this builder
-
variable
Sets an extra variable, e.g.serviceName.- Parameters:
name- variable namevalue- value- Returns:
- this builder
-
serviceName
Sets${serviceName}(the tracing service name the factory configured).- Parameters:
serviceName- service name- Returns:
- this builder
-
only
Restricts the run to these scenario ids.- Parameters:
ids- scenario ids- Returns:
- this builder
-
register
Registers (or overrides) operations of a category.- Parameters:
categoryOps- operations- Returns:
- this builder
-
op
Registers one operation.- Parameters:
category- categoryop- operation namehandler- handler- Returns:
- this builder
-
poll
Repeats a failing step ofopuntil its expectation passes ortimeout(or the step'stimeoutMsargument) runs out, for eventually consistent backends.listServicespolls forConformanceRunner.DEFAULT_POLL_TIMEOUTby default;Duration.ZEROturns polling off for an op.- Parameters:
op- operation nametimeout- how long to repeat the step- Returns:
- this builder
-
pollInterval
Sets the pause between repeated steps (defaultConformanceRunner.DEFAULT_POLL_INTERVAL).- Parameters:
interval- positive pause- Returns:
- this builder
-
build
Builds the runner.- Returns:
- the runner
-