Skip to content

Commit

Permalink
[chore] Force require.EventuallyWithT to fail properly (#35032)
Browse files Browse the repository at this point in the history
I noticed on #34720 and #35026 that execution of the test continued
beyond a failure of `require.EventuallyWithT`. Based on the description
alone, I would expect that using `assert` within
`require.EventuallyWithT` should cause execution to stop if the
assertion fails, but it appears this may not be the case. However, this
change apparently works as intended.
  • Loading branch information
djaglowski authored Sep 13, 2024
1 parent 9f56cf0 commit 466b86e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion receiver/windowseventlogreceiver/receiver_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ func requireExpectedLogRecords(t *testing.T, sink *consumertest.LogsSink, expect
// logs sometimes take a while to be written, so a substantial wait buffer is needed
require.EventuallyWithT(t, func(c *assert.CollectT) {
actualLogRecords = filterAllLogRecordsBySource(t, sink, expectedEventSrc)
assert.Len(c, actualLogRecords, expectedEventCount)
require.Len(c, actualLogRecords, expectedEventCount)
}, 10*time.Second, 250*time.Millisecond)

return actualLogRecords
Expand Down

0 comments on commit 466b86e

Please sign in to comment.