-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
tests: event_loop: increase eplison on linux. #8246
Conversation
@pwhelan thanks for submitting this PR. some comments: there is a commit subject called The whole PR description is about fixing the test framework but there are commits for in_calyptia_fleet plugin , please submit those in a different PR |
Sorry, that must have slipped in. I'll rebase the change on top of master, correctly. @edsiper I accidentally initially based the branch off of #8102 since it was meant as a fixed to a test that it is failing. |
f9f0cdb
to
2427770
Compare
There is another failure on macOS for flb-rt-dummy I plan to tackle in another PR: https://github.com/fluent/fluent-bit/actions/runs/7092496098/job/19414115930?pr=8246#step:4:4669 [2023/12/07 14:35:32] [ info] [input] pausing dummy.0
[ FAILED ]
in_dummy.c:538: Check records->num_records >= 20... failed
FAILED: 1 of 1 unit tests has failed. |
…ghbours. Increase the epsilon for timed tests on linux to account for noisy neighbours and other factors when running tests. Without this increase the event_loop tests is prone to random failures, especially when the same machine is being used for other tasks. Signed-off-by: Phillip Whelan <[email protected]>
2427770
to
4597b42
Compare
note: prefix must be |
Summary
The event loop has multiple time epsilons defined, one for each operating system, which defines the longest time delta that is acceptable for a wait or timeout when running timers in the event loop. This delta can easily be exceeded when either running on over-provisioned machines, running other tasks on the same hardware, etc...
This pull request increases this epsilon from 20ms to 50ms for linux. I arrived at this number by running the tests in 1024 parallel instances using GNU parallel while running sysbench on the same AMD Ryzen 9 5900X 12-Core Processor.
The script I used to run the parallel instances of the test:
#!/bin/bash ./bin/flb-it-flb_event_loop test_non_blocking_and_blocking_timeout
I used two scripts simply to mask the fact that GNU parallel needs to pass different arguments to each instance.
I ran tests.sh in a while loop while running sysbench in another terminal:
I was able to successfully run the test script multiple times for the entire duration of the sysbench test without any failures. My machine might be overpowered compared to the actual runners at github which might justify raising the epsilon even more.
Enter
[N/A]
in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-test
label to test for all targets (requires maintainer to do).Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.