diff --git a/internal/http/check_test.go b/internal/http/check_test.go index 7cdc3c3..7d95d3b 100644 --- a/internal/http/check_test.go +++ b/internal/http/check_test.go @@ -245,6 +245,15 @@ func TestIntegrationHttpMode(t *testing.T) { resp agent.State } + for { + res, err := http.Get(fmt.Sprintf("http://localhost:%d/healthcheck", *tt.args.config.Port)) + if err == nil && res.StatusCode == 200 { + break + } + l.Info("Waiting for check to be ready") + time.Sleep(1 * time.Second) + } + // ch will receive the results of the concurrent job executions ch := make(chan not, len(tt.args.jobs)) wg := sync.WaitGroup{}