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

Fix flaky test TestAddCounterInvalidArgWhenQueryClosed #27313

Merged
merged 3 commits into from
Aug 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Allow metric prefix override per service in gcp module. {pull}26960[26960]
- Change `server_status_path` default setting to `nginx_status` for the `nginx` module. {pull}26642[26642]
- Fix cloudwatch metricset collecting duplicate data points. {pull}27248[27248]
- Fix flaky test TestAddCounterInvalidArgWhenQueryClosed. {issue}27312[27312] {pull}27313[27313]

*Packetbeat*

Expand Down
8 changes: 7 additions & 1 deletion metricbeat/helper/windows/pdh/pdh_query_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,13 @@ func (q *Query) ExpandWildCardPath(wildCardPath string) ([]string, error) {
return UTF16ToStringArray(expdPaths), nil
} else {
if expdPaths, err = PdhExpandWildCardPath(utfPath); err != nil {
return nil, err
if err == PDH_MORE_DATA {
if expdPaths, err = PdhExpandWildCardPath(utfPath); err != nil {
return nil, err
}
} else {
return nil, err
}
}
paths := UTF16ToStringArray(expdPaths)
// in several cases ExpandWildCardPath win32 api seems to return initial wildcard without any errors, adding some waiting time between the 2 ExpandWildCardPath api calls seems to be succesfull but that will delay data retrieval
Expand Down