TestFlowAggregatorSecureConnection/https failed with empty error message #6478
Labels
area/test/e2e
Issues or PRs related to Antrea specific end-to-end testing.
kind/failing-test
Categorizes issue or PR as related to a consistently or frequently failing test.
I just saw a failure in CI for
TestFlowAggregatorSecureConnection/https
I wanted to look into it but then realized that the necessary information for troubleshooting was missing. Here are the test logs:
Notice how
Messages:
is empty, even though according to the test code it should include the content of all IPFIX records received by the collector:antrea/test/e2e/flowaggregator_test.go
Line 1466 in 0f75c50
After checking the testify source code, I realized that they are using
bufio.Scanner
to print formatted messages: https://github.com/stretchr/testify/blob/bb548d0473d4e1c9b7bbfd6602c7bf12f7a84dd2/assert/assertions.go#L304-L313bufio.Scanner
has a max token size ofMaxScanTokenSize = 64 * 1024
, and in this case a token should correspond to a line of text. We are probably trying to print a line that is longer than that. IfrecordSlices
is formatted as one line of text, this is likely to be the case. The result is that nothing is printed.Unfortunately, this makes the error message useless for troubleshooting the test failure. The test code should be updated so that we only try to print the relevant information, formatted in a helpful way, and possibly not through the testify assertions.
The text was updated successfully, but these errors were encountered: