Skip to content

Commit

Permalink
[receiver/haproxy] Unit test timing out (#32940)
Browse files Browse the repository at this point in the history
I wasn't able to reproduce the exact situation from CI, but the tests I
changed weren't completing at all here. Looking closely, it looks like
they never closed the stream, something the first test does. After
closing it, the tests start passing locally for me. While I'm not
confident this will fix the CI flaky failures, this does make the test
work locally for me.

Fixes #32877

Signed-off-by: Juraci Paixão Kröhling <[email protected]>

Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Co-authored-by: Alex Boten <[email protected]>
  • Loading branch information
jpkrohling and codeboten authored May 8, 2024
1 parent f1f2a85 commit ba9ef9e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions receiver/haproxyreceiver/scraper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func Test_scraper_readStatsWithIncompleteValues(t *testing.T) {
require.NoError(t, err2)
_, err2 = c.Write(stats)
require.NoError(t, err2)
require.NoError(t, c.Close())
default:
require.Fail(t, fmt.Sprintf("invalid message: %v", data))
}
Expand Down Expand Up @@ -128,6 +129,7 @@ func Test_scraper_readStatsWithNoValues(t *testing.T) {
require.NoError(t, err2)
_, err2 = c.Write(stats)
require.NoError(t, err2)
require.NoError(t, c.Close())
default:
require.Fail(t, fmt.Sprintf("invalid message: %v", data))
}
Expand Down

0 comments on commit ba9ef9e

Please sign in to comment.