You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is no way to say "the container is ready when this function says so". A readiness check that the built-in strategies do not cover, such as "a query succeeds" or "the topic exists", needs a class:
subclass StartupCheckStrategy, which receives a raw Dockerode client and a container id and returns "PENDING" | "SUCCESS" | "FAIL", or
implement WaitStrategy in full, including the timeout bookkeeping.
The usual alternative is to let start() return and then poll in the test with a hand-written retry loop.
Expected
A function-based strategy that is polled until it returns true, with the standard startup timeout:
a new strategy in packages/testcontainers/src/wait-strategies/
Notes
.NET's IWaitUntil is a single UntilAsync(IContainer) method added with AddCustomWaitStrategy. Go has wait.ForNop(func(ctx, target) error), wait.ForSQL and wait.ForExec.
Activity