elastic / elastic-agent

Elastic Agent - single, unified way to add monitoring for logs, metrics, and other types of data to a host.
Other
18 stars 144 forks source link

TestAddToBucket/errors_>_than_limit_within_timespans,_off_by_one #3290

Open cmacknz opened 1 year ago

cmacknz commented 1 year ago

Flaky Test

Stack Trace

=== RUN   TestAddToBucket/errors_>_than_limit_within_timespans,_off_by_one
    command_test.go:41: 2023-08-24 18:01:06.065255 +0000 GMT m=+1.312210301 : add 1 element when there are 2.000000 tokens available
    command_test.go:41: 2023-08-24 18:01:06.1669009 +0000 GMT m=+1.413856201 : add 1 element when there are 2.000000 tokens available
    command_test.go:41: 2023-08-24 18:01:06.1692908 +0000 GMT m=+1.416246101 : add 1 element when there are 1.031865 tokens available
    command_test.go:46: 
            Error Trace:    C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-3289/src/github.com/elastic/elastic-agent/pkg/component/runtime/command_test.go:46
            Error:          Not equal: 
                            expected: true
                            actual  : false
            Test:           TestAddToBucket/errors_>_than_limit_within_timespans,_off_by_one
--- FAIL: TestAddToBucket/errors_>_than_limit_within_timespans,_off_by_one (0.29s)
elasticmachine commented 1 year ago

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

cmacknz commented 1 year ago

There is nothing Windows specific in these tests, easiest path now is to just skip them completely on Windows. Our Windows CI agents appear to be slower or at least more variable in their timing, there is little value in tuning this test to work specifically on them. We have tried to fix this multiple times already by changing the timing.