- Only compute the log string to be printed on failure when we actually fail instead of every 0.05s.
- As we find each needle (expected message) in the haystack (log output), stop searching for it. If we fail and time out, we will only complain about the needles (expected messages) we didn’t find.
Found while developing a new test case in #33336 (review)