fix: time out on 60 sec + of converge checks
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
See coop-cloud/organising#246.
This commit is contained in:
parent
486a1717e7
commit
915083b426
@ -6,6 +6,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
abraClient "coopcloud.tech/abra/pkg/client"
|
abraClient "coopcloud.tech/abra/pkg/client"
|
||||||
"coopcloud.tech/abra/pkg/upstream/convert"
|
"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)
|
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…
x
Reference in New Issue
Block a user