FileExistsWaitStrategy class

Waits until a specific file exists on the container's filesystem.

Runs test -f <filePath> inside the container on each poll attempt via exec. A zero exit code means the file exists. On timeout, a diagnostic ls of the parent directory is run inside the container to help identify why the file was not created.

Example:

container.waitingFor(FileExistsWaitStrategy('/tmp/ready'));
Inheritance

Constructors

FileExistsWaitStrategy(String filePath)
Creates a FileExistsWaitStrategy that waits for filePath to appear.

Properties

filePath String
The absolute path inside the container to check for existence.
final
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>
Runs test -f <filePath> inside the container on each poll cycle.
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