File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -165,7 +165,16 @@ func (c *DockerContainer) StopLogProduction() error {
165165
166166 c .logProductionWaitGroup .Wait ()
167167
168- return <- c .logProductionError
168+ if err := <- c .logProductionError ; err != nil {
169+ if errors .Is (err , context .DeadlineExceeded ) || errors .Is (err , context .Canceled ) {
170+ // Returning context errors is not useful for the consumer.
171+ return nil
172+ }
173+
174+ return err
175+ }
176+
177+ return nil
169178}
170179
171180func (c * DockerContainer ) WithLogProductionTimeout (timeout time.Duration ) {
Original file line number Diff line number Diff line change @@ -17,15 +17,15 @@ var defaultReadinessHook = func() LifecycleHooks {
1717 func (ctx context.Context , c StartedContainer ) error {
1818 // wait until all the exposed ports are mapped:
1919 // it will be ready when all the exposed ports are mapped,
20- // checking every 50ms, up to 5s , and failing if all the
21- // exposed ports are not mapped in that time .
20+ // checking every 50ms, up to 1s , and failing if all the
21+ // exposed ports are not mapped in 5s .
2222 dockerContainer := c .(* DockerContainer )
2323
2424 b := backoff .NewExponentialBackOff ()
2525
2626 b .InitialInterval = 50 * time .Millisecond
27- b .MaxElapsedTime = 1 * time .Second
28- b .MaxInterval = 5 * time . Second
27+ b .MaxElapsedTime = 5 * time .Second
28+ b .MaxInterval = time . Duration ( float64 ( time . Second ) * backoff . DefaultRandomizationFactor )
2929
3030 err := backoff .RetryNotify (
3131 func () error {
Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ func TestReaperReusedIfHealthy(t *testing.T) {
210210 t .Skip ("Ryuk is disabled, skipping test" )
211211 }
212212
213- SkipIfContainerRuntimeIsNotHealthy (& testing. T {} )
213+ SkipIfContainerRuntimeIsNotHealthy (t )
214214
215215 ctx := context .Background ()
216216
@@ -240,7 +240,7 @@ func TestRecreateReaperIfTerminated(t *testing.T) {
240240 t .Skip ("Ryuk is disabled, skipping test" )
241241 }
242242
243- SkipIfContainerRuntimeIsNotHealthy (& testing. T {} )
243+ SkipIfContainerRuntimeIsNotHealthy (t )
244244
245245 ctx := context .Background ()
246246
You can’t perform that action at this time.
0 commit comments