2
2
mirror of https://github.com/octoleo/restic.git synced 2024-09-28 06:29:01 +00:00

Increase waiting time for network services

This commit is contained in:
Alexander Neumann 2017-05-12 21:45:18 +02:00
parent 88de3cfecc
commit ec5e984ed9
2 changed files with 4 additions and 2 deletions

View File

@ -32,9 +32,10 @@ func runRESTServer(ctx context.Context, t testing.TB, dir string) func() {
// wait until the TCP port is reachable
var success bool
for i := 0; i < 10; i++ {
time.Sleep(200 * time.Millisecond)
c, err := net.Dial("tcp", "localhost:8000")
if err != nil {
time.Sleep(200 * time.Millisecond)
continue
}

View File

@ -50,9 +50,10 @@ func runMinio(ctx context.Context, t testing.TB, dir, key, secret string) func()
// wait until the TCP port is reachable
var success bool
for i := 0; i < 10; i++ {
time.Sleep(200 * time.Millisecond)
c, err := net.Dial("tcp", "localhost:9000")
if err != nil {
time.Sleep(200 * time.Millisecond)
continue
}