ContainerStatusWaitStrategy class

Waits until the container's lifecycle status is 'running'.

If the status moves into any state not listed in continueStatuses, the strategy stops polling immediately and throws a StateError (rather than waiting for the full timeout), because the container has terminated and will not become 'running'.

This strategy is used internally by DockerContainer.exposedPort to ensure the container is started before port mapping is queried.

Example:

container.waitingFor(ContainerStatusWaitStrategy());
Inheritance

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

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>
Polls the container status until it equals 'running'.
override
withPollInterval(Duration interval) WaitStrategy
Sets the poll interval between readiness checks.
inherited
withStartupTimeout(Duration timeout) WaitStrategy
Sets the maximum startup timeout.
inherited
withTransientExceptions(List<Type> exceptions) WaitStrategy
Adds exceptions to the set of exception types that are treated as transient failures during polling.
inherited

Operators

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

Constants

continueStatuses → const Set<String>
Status values that mean "still starting, keep polling".