From 7360b0f73ce13547f24f40b2a876de64ff2cdd0d Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Fri, 26 Jul 2019 11:41:58 +0200 Subject: [PATCH] test cases: wait 100 milliseconds before recheck if the test server is up this avoid a lot of useless warnings in travis logs --- api/api_test.go | 1 + sftpd/sftpd_test.go | 1 + 2 files changed, 2 insertions(+) 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)