fix: time out on 60 sec + of converge checks
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
See coop-cloud/organising#246.
This commit is contained in:
parent
486a1717e7
commit
915083b426
|
@ -6,6 +6,7 @@ import (
|
|||
"io"
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
abraClient "coopcloud.tech/abra/pkg/client"
|
||||
"coopcloud.tech/abra/pkg/upstream/convert"
|
||||
|
@ -479,5 +480,13 @@ func waitOnService(ctx context.Context, cl *dockerclient.Client, serviceID strin
|
|||
}()
|
||||
|
||||
go io.Copy(ioutil.Discard, pipeReader)
|
||||
return <-errChan
|
||||
|
||||
timeout := 60 * time.Second
|
||||
|
||||
select {
|
||||
case err := <-errChan:
|
||||
return err
|
||||
case <-time.After(timeout):
|
||||
return fmt.Errorf("%s has still not converged (%s second timeout)?", serviceID, timeout)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue