Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: readiness hook back off #2718

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,15 @@ var defaultReadinessHook = func() ContainerLifecycleHooks {
func(ctx context.Context, c Container) error {
// wait until all the exposed ports are mapped:
// it will be ready when all the exposed ports are mapped,
// checking every 50ms, up to 5s, and failing if all the
// exposed ports are not mapped in that time.
// checking every 50ms, up to 1s, and failing if all the
// exposed ports are not mapped in 5s.
dockerContainer := c.(*DockerContainer)

b := backoff.NewExponentialBackOff()

b.InitialInterval = 50 * time.Millisecond
b.MaxElapsedTime = 1 * time.Second
b.MaxInterval = 5 * time.Second
b.MaxElapsedTime = 5 * time.Second
b.MaxInterval = time.Duration(float64(time.Second) * backoff.DefaultRandomizationFactor)
mdelapenya marked this conversation as resolved.
Show resolved Hide resolved

err := backoff.RetryNotify(
func() error {
Expand Down
Loading