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
}