Skip to content

Commit

Permalink
Add sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
jesusfcr committed Dec 18, 2024
1 parent 9e42718 commit 767acf7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions internal/http/check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand Down

0 comments on commit 767acf7

Please sign in to comment.