mirror of
https://github.com/containous/traefik.git
synced 2025-03-19 18:50:12 +03:00
Fix flaky healthcheck test
This commit is contained in:
parent
580e7fa774
commit
268d1edc8f
@ -135,6 +135,8 @@ func newHTTPServer(healthSequence ...int) *HTTPServer {
|
||||
func (s *HTTPServer) ServeHTTP(w http.ResponseWriter, _ *http.Request) {
|
||||
if s.status.IsEmpty() {
|
||||
s.done()
|
||||
// This ensures that the health-checker will handle the context cancellation error before receiving the HTTP response.
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user