Summary
Add a builder option to automatically wait for the container to be ready before returning from start().
Current API
let guard = ContainerGuard::new(template).start().await?;
guard.template().wait_for_ready().await?; // separate call required
Proposed API
let guard = ContainerGuard::new(template)
.auto_wait_ready(true) // or .wait_on_start(true)
.start()
.await?;
// Container is guaranteed ready at this point
Benefits
- Single call for "give me a ready container"
- Reduces boilerplate in tests
- Can still disable for cases where you don't need to wait
Considerations
- Should this be the default behavior? (breaking change if so)
- Timeout configuration for the wait
- Error handling if readiness check fails
Related to #218 (wait_for_ready convenience method)
Part of testing utilities enhancements.
Summary
Add a builder option to automatically wait for the container to be ready before returning from
start().Current API
Proposed API
Benefits
Considerations
Related to #218 (wait_for_ready convenience method)
Part of testing utilities enhancements.