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

[Metricbeat] Flaky apache_status integration test #7726

Closed
ruflin opened this issue Jul 25, 2018 · 1 comment · Fixed by #8028
Closed

[Metricbeat] Flaky apache_status integration test #7726

ruflin opened this issue Jul 25, 2018 · 1 comment · Fixed by #8028
Assignees
Labels
flaky-test Unstable or unreliable test cases. Metricbeat Metricbeat

Comments

@ruflin
Copy link
Contributor

ruflin commented Jul 25, 2018

Link: https://beats-ci.elastic.co/job/elastic+beats+master+multijob-darwin/beat=metricbeat,label=macosx/685/console

Test output:

20:57:53 command [go test -race -cover -coverprofile /var/folders/h7/35nznc4s255bn6_pkdm2fgdh0000kz/T/gotestcover-550085795 github.com/elastic/beats/metricbeat/module/apache/status]: exit status 1
20:57:53 --- FAIL: TestFetchTimeout (0.11s)
20:57:53 	assertions.go:247: 
20:57:53                           
20:57:53 	Error Trace:	status_test.go:170
20:57:53 		
20:57:53 	Error:      	An error is expected but got nil.
20:57:53 		
20:57:53 	Test:       	TestFetchTimeout
20:57:53 FAIL
20:57:53 coverage: 91.7% of statements
@ruflin ruflin added Metricbeat Metricbeat flaky-test Unstable or unreliable test cases. labels Jul 25, 2018
@andrewkroh andrewkroh changed the title Flaky apache_status integration test [Metricbeat] Flaky apache_status integration test Aug 17, 2018
@andrewvc andrewvc self-assigned this Aug 20, 2018
andrewvc added a commit to andrewvc/beats that referenced this issue Aug 20, 2018
This attempts to fix a flakey apache module test by making it less sensitive to timing issues.

Before this patch there was only 50ms for slack for the timeout to happen. My thesis here is that under contention > 50ms of delay was introduced, likely by the Kernel thread scheduler.

By switching to a wait group we have a more deterministic test. Additionally, we now cleanup the server go routine more precisely. It now ends exactly when the test is done, instead of us having it hang around for a fixed interval.

Fixes elastic#7726
@andrewvc
Copy link
Contributor

Potential fix here: #8028

ruflin pushed a commit that referenced this issue Aug 21, 2018
This attempts to fix a flakey apache module test by making it less sensitive to timing issues.

Before this patch there was only 50ms for slack for the timeout to happen. My thesis here is that under contention > 50ms of delay was introduced, likely by the Kernel thread scheduler.

By switching to a wait group we have a more deterministic test. Additionally, we now cleanup the server go routine more precisely. It now ends exactly when the test is done, instead of us having it hang around for a fixed interval.

Fixes #7726
andrewvc added a commit to andrewvc/beats that referenced this issue Aug 22, 2018
This attempts to fix a flakey apache module test by making it less sensitive to timing issues.

Before this patch there was only 50ms for slack for the timeout to happen. My thesis here is that under contention > 50ms of delay was introduced, likely by the Kernel thread scheduler.

By switching to a wait group we have a more deterministic test. Additionally, we now cleanup the server go routine more precisely. It now ends exactly when the test is done, instead of us having it hang around for a fixed interval.

Fixes elastic#7726

(cherry picked from commit 76077f0)
jsoriano pushed a commit that referenced this issue Aug 23, 2018
This attempts to fix a flakey apache module test by making it less sensitive to timing issues.

Before this patch there was only 50ms for slack for the timeout to happen. My thesis here is that under contention > 50ms of delay was introduced, likely by the Kernel thread scheduler.

By switching to a wait group we have a more deterministic test. Additionally, we now cleanup the server go routine more precisely. It now ends exactly when the test is done, instead of us having it hang around for a fixed interval.

Fixes #7726

(cherry picked from commit 76077f0)
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. Metricbeat Metricbeat
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants