Skip to content

Commit

Permalink
Fix test failure message
Browse files Browse the repository at this point in the history
  • Loading branch information
belimawr committed Oct 22, 2024
1 parent ed11202 commit 59b7cb6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions filebeat/tests/integration/systemlogs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ func TestSystemLogsCanUseJournaldInput(t *testing.T) {

// Scan every event in the output until at least one from
// each fileset (auth, syslog) is found.
waitForAllFilesets(t, filepath.Join(workDir, "output*.ndjson"))
waitForAllFilesets(
t,
filepath.Join(workDir, "output*.ndjson"),
"did not find events from both filesets: 'auth' and 'syslog'",
)
}

func waitForAllFilesets(t *testing.T, outputGlob string, msgAndArgs ...any) {
Expand All @@ -80,7 +84,7 @@ func waitForAllFilesets(t *testing.T, outputGlob string, msgAndArgs ...any) {
findFilesetNames(t, outputGlob),
time.Minute,
10*time.Millisecond,
msgAndArgs)
msgAndArgs...)
}

func findFilesetNames(t *testing.T, outputGlob string) func() bool {
Expand Down

0 comments on commit 59b7cb6

Please sign in to comment.