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] TestReadService in service_integration_windows_test fails #7977

Closed
kvch opened this issue Aug 15, 2018 · 2 comments
Closed

[Metricbeat] TestReadService in service_integration_windows_test fails #7977

kvch opened this issue Aug 15, 2018 · 2 comments
Assignees
Labels
flaky-test Unstable or unreliable test cases. Metricbeat Metricbeat Team:Integrations Label for the Integrations team :Windows

Comments

@kvch
Copy link
Contributor

kvch commented Aug 15, 2018

TestReadService unit test fails on Windows.
Jenkins: https://beats-ci.elastic.co/job/elastic+beats+pull-request+multijob-windows/6087/beat=metricbeat,label=windows/testReport/junit/(root)/service/TestReadService/

Package: github.com/elastic/beats/metricbeat/module/windows/service
Test:    TestReadService
assertions.go:247:
Error: go test failed: 1 test failures

   Error Trace:    service_integration_windows_test.go:79

   Error:          Not equal:

                   expected: 0x0

                   actual  : 0x5e4

   Test:           TestReadService
assertions.go:247:

   Error Trace:    service_integration_windows_test.go:81

   Error:          Not equal:

                   expected: "Stopped"

                   actual  : "Running"

   Test:           TestReadService
@kvch kvch added :Windows Metricbeat Metricbeat flaky-test Unstable or unreliable test cases. labels Aug 15, 2018
@andrewkroh
Copy link
Member

The first step here should be to add more detail to the failure messages so we can understand what services are causing the failures.

It could some kind of on-demand service that is stopping and starting in between the period in which we collect the data via Windows APIs and the time when we verify that against what WMI reports for each service.

@andrewkroh andrewkroh changed the title TestReadService in service_integration_windows_test fails [Metricbeat] - TestReadService in service_integration_windows_test fails Aug 17, 2018
@andrewkroh andrewkroh changed the title [Metricbeat] - TestReadService in service_integration_windows_test fails [Metricbeat] TestReadService in service_integration_windows_test fails Aug 17, 2018
andrewkroh added a commit to andrewkroh/beats that referenced this issue Aug 17, 2018
This adds service names to the output of test failures to help us diagnose the cause
of the test failure in the future.

Relates to elastic#7977
ruflin pushed a commit that referenced this issue Aug 20, 2018
This adds service names to the output of test failures to help us diagnose the cause
of the test failure in the future.

Relates to #7977
@ruflin ruflin added the Team:Integrations Label for the Integrations team label Feb 7, 2019
@narph narph assigned narph and unassigned andrewkroh Apr 4, 2019
narph added a commit to narph/beats that referenced this issue Apr 15, 2019
Some services can change state before reader.Read() call is executed which will result in a test faillure.
Fix test by introducing a confidence factor and enriching the error message with the state-changed service details.

Fixes elastic#8880 and elastic#7977
narph added a commit that referenced this issue Apr 15, 2019
* Fix flaky service_integration_windows_test

Some services can change state before reader.Read() call is executed which will result in a test faillure.
Fix test by introducing a confidence factor and enriching the error message with the state-changed service details.

Fixes #8880 and #7977

* Update metricbeat/module/windows/service/service_integration_windows_test.go

Co-Authored-By: narph <mariana@elastic.co>
@narph narph closed this as completed Apr 15, 2019
@narph
Copy link
Contributor

narph commented Apr 15, 2019

fixed with #11662

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 Team:Integrations Label for the Integrations team :Windows
Projects
None yet
Development

No branches or pull requests

5 participants