fix: use exponential backoff mechanism to listen on nginx.StatusPort
This commit is contained in:
parent
714783c052
commit
a08887040b
3 changed files with 54 additions and 7 deletions
|
|
@ -18,7 +18,6 @@ package controller
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
|
|
@ -46,7 +45,7 @@ func TestNginxCheck(t *testing.T) {
|
|||
|
||||
mux := http.NewServeMux()
|
||||
|
||||
listener, err := net.Listen("tcp", fmt.Sprintf(":%v", nginx.StatusPort))
|
||||
listener, err := tryListen("tcp", fmt.Sprintf(":%v", nginx.StatusPort))
|
||||
if err != nil {
|
||||
t.Fatalf("creating tcp listener: %s", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue