Wait for mock metrics server to have started before running commands
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
This commit is contained in:
parent
9138a3c76b
commit
5ba0522271
|
|
@ -22,6 +22,7 @@ import (
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/labstack/echo"
|
"github.com/labstack/echo"
|
||||||
)
|
)
|
||||||
|
|
@ -77,4 +78,7 @@ func (s *MockMetricsServer) Start() {
|
||||||
s.e.POST("/usage", s.handlePostUsage)
|
s.e.POST("/usage", s.handlePostUsage)
|
||||||
_ = s.e.Start(":1323")
|
_ = s.e.Start(":1323")
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
// wait a bit for the mock metrics server to actually listen
|
||||||
|
time.Sleep(500 * time.Millisecond)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue