CompositeWaitStrategy class

Chains multiple wait strategies and runs them in sequence.

All child strategies are applied in order; the container is considered ready only after every strategy succeeds.

withStartupTimeout and withPollInterval are propagated to all child strategies so that a single call configures the entire chain.

Example:

container.waitingFor(
  CompositeWaitStrategy([
    PortWaitStrategy(8080),
    HttpWaitStrategy(8080, path: '/ready'),
  ]),
);
Inheritance

Constructors

CompositeWaitStrategy(List<WaitStrategy> strategies)
Creates a CompositeWaitStrategy from a list of child strategies.

Properties

hashCode → int
The hash code for this object.
no setterinherited
pollInterval ↔ Duration
Time between successive polling attempts.
getter/setter pairinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
startupTimeout ↔ Duration
Maximum time to wait for the container to become ready.
getter/setter pairinherited
strategies → List<WaitStrategy>
The ordered list of strategies to run.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
poll(Future<bool> check(), {List<Type>? transientExceptions}) → Future<bool>
Adaptive polling loop.
inherited
toString() → String
A string representation of this object.
inherited
waitUntilReady(WaitStrategyTarget target) → Future<void>
Runs all strategies in sequence against target.
override
withPollInterval(Duration interval) → WaitStrategy
Sets pollInterval on this strategy and on all child strategies.
override
withStartupTimeout(Duration timeout) → WaitStrategy
Sets startupTimeout on this strategy and on all child strategies.
override
withTransientExceptions(List<Type> exceptions) → WaitStrategy
Appends exceptions to the transient list on this strategy and on all child strategies. Returns this.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited