Skip to content

Commit

Permalink
Fix error messages and improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
belimawr committed Sep 16, 2024
1 parent 8c247ad commit 33bcac0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libbeat/tests/integration/elasticsearch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,16 @@ func startMockES(t *testing.T, addr string) (*http.Server, metrics.Registry) {
}
return true
},
time.Second, time.Millisecond, "first server must be up")
time.Second, time.Millisecond, "mock-es server did not start on '%s'", addr)

return &s, mr
}

// waitForEventToBePublished waits for at least one event published
// by inspecting the count for `bulk.create.total` in `mr`. Once
// the counter is > 1, waitForEventToBePublished returns. If that
// does not happen within 10min, then the test fails with a call to
// t.Fatal.
func waitForEventToBePublished(t *testing.T, mr metrics.Registry) {
t.Helper()
require.Eventually(t, func() bool {
Expand Down

0 comments on commit 33bcac0

Please sign in to comment.