mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
* Code to investigate issue #4461 (rare test failure in TestListenAndServeTLS) * Use UTCNow() instead of time.Now().UTC()
This commit is contained in:
parent
f59d7a04b4
commit
6f4862659f
@ -390,11 +390,17 @@ func TestServerListenAndServeTLS(t *testing.T) {
|
||||
Transport: tr,
|
||||
}
|
||||
// Keep trying the server until it's accepting connections
|
||||
start := UTCNow()
|
||||
for {
|
||||
res, _ := client.Get("https://" + addr)
|
||||
if res != nil && res.StatusCode == http.StatusOK {
|
||||
break
|
||||
}
|
||||
// Explicit check to terminate loop after 5 minutes
|
||||
// (for investigational purpose of issue #4461)
|
||||
if UTCNow().Sub(start) >= 5*time.Minute {
|
||||
t.Fatalf("Failed to establish connection after 5 minutes")
|
||||
}
|
||||
}
|
||||
|
||||
// Once a request succeeds, subsequent requests should
|
||||
|
Loading…
Reference in New Issue
Block a user