fix: time out on 60 sec + of converge checks
continuous-integration/drone/push Build is passing Details

See coop-cloud/organising#246.
This commit is contained in:
decentral1se 2021-11-14 23:15:35 +01:00
parent 486a1717e7
commit 915083b426
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 10 additions and 1 deletions

View File

@ -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)
}
}