diff --git a/api/api_test.go b/api/api_test.go index 1fefb724..7bb57d80 100644 --- a/api/api_test.go +++ b/api/api_test.go @@ -101,6 +101,7 @@ func waitTCPListening(address string) { conn, err := net.Dial("tcp", address) if err != nil { fmt.Printf("tcp server %v not listening: %v\n", address, err) + time.Sleep(100 * time.Millisecond) continue } fmt.Printf("tcp server %v now listening\n", address) diff --git a/sftpd/sftpd_test.go b/sftpd/sftpd_test.go index 5d3e8930..eb0f3df9 100644 --- a/sftpd/sftpd_test.go +++ b/sftpd/sftpd_test.go @@ -140,6 +140,7 @@ func waitTCPListening(address string) { conn, err := net.Dial("tcp", address) if err != nil { fmt.Printf("tcp server %v not listening: %v\n", address, err) + time.Sleep(100 * time.Millisecond) continue } fmt.Printf("tcp server %v now listening\n", address)