Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flaky Test: TestMaxBytesLimit intermittently fails #31863

Closed
taylor-swanson opened this issue Jun 8, 2022 · 5 comments
Closed

Flaky Test: TestMaxBytesLimit intermittently fails #31863

taylor-swanson opened this issue Jun 8, 2022 · 5 comments
Assignees
Labels
flaky-test Unstable or unreliable test cases. Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Comments

@taylor-swanson
Copy link
Contributor

Flaky Test

cd libbeat/reader/readfile
go test -test.run TestMaxBytesLimit -count 100 .

Error

--- FAIL: TestMaxBytesLimit (0.00s)
    line_test.go:402: the bytes read are not equal to the bytes input, expected: 81273 got: 76439
@taylor-swanson taylor-swanson added bug flaky-test Unstable or unreliable test cases. labels Jun 8, 2022
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jun 8, 2022
@taylor-swanson taylor-swanson added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Jun 8, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jun 8, 2022
@taylor-swanson taylor-swanson removed the bug label Jun 8, 2022
@taylor-swanson taylor-swanson changed the title TestMaxBytesLimit intermittently fails Flaky Test: TestMaxBytesLimit intermittently fails Jun 8, 2022
@cmacknz
Copy link
Member

cmacknz commented Jun 8, 2022

We'll try to look at this today. If not we can temporarily revert the change that triggered it.

@cmacknz cmacknz self-assigned this Jun 8, 2022
@cmacknz
Copy link
Member

cmacknz commented Jun 8, 2022

I started investigating this and I think there are multiple problems involved here. Part of the reason this test is flaky is that the test generates input randomly, and it doesn't always generate it in a way that always hits the "max bytes exceeded" path.

I am also not convinced that this code path works entirely correctly even without this change.

If the flakyness here is getting in the way before I can create a PR to fix it, just revert the change and I'll restore it afterwards. I didn't get to completely fixing this today.

@liuwenping
Copy link
Contributor

sorry, I'll fix this problem today.

@cmacknz
Copy link
Member

cmacknz commented Jun 9, 2022

Fixed by #31882

@cmacknz cmacknz closed this as completed Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flaky-test Unstable or unreliable test cases. Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

No branches or pull requests

4 participants