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 InstanceDataCollectionCollection_CopyTo by retrying on 0 values #70119

Merged
merged 5 commits into from
Jun 2, 2022

Conversation

smasher164
Copy link
Member

Previously, when pcc.ReadCategory() returned 0 values, we did not retry,
which broke the test that asserted its length > 0. This time, we retry
when there are 0 values, by triggering the RetryHelper's exception
handler.

Fixes #68291

Previously, when pcc.ReadCategory() returned 0 values, we did not retry,
which broke the test that asserted its length > 0. This time, we retry
when there are 0 values, by triggering the RetryHelper's exception
handler.

Fixes dotnet#68291
@ghost
Copy link

ghost commented Jun 1, 2022

Tagging subscribers to this area: @dotnet/area-system-diagnostics-performancecounter
See info in area-owners.md if you want to be subscribed.

Issue Details

Previously, when pcc.ReadCategory() returned 0 values, we did not retry,
which broke the test that asserted its length > 0. This time, we retry
when there are 0 values, by triggering the RetryHelper's exception
handler.

Fixes #68291

Author: smasher164
Assignees: -
Labels:

area-System.Diagnostics.PerformanceCounter

Milestone: -

Copy link
Member

@ViktorHofer ViktorHofer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. LGTM

@danmoseley danmoseley merged commit c835dc2 into dotnet:main Jun 2, 2022
@danmoseley
Copy link
Member

thanks!

@danmoseley
Copy link
Member

Do we need the same fix at

InstanceDataCollectionCollection idColCol = pcc.ReadCategory();
?

Does this fix #60933 as well?

BTW, perf counter tests have had other random failures (eg #60933 (comment)) .. I'm not clear what is left after fixing ReadCategory(). in such cases it can be interesting to data dive into test history to see what failure modes there were. this can either be done with runfo or against the raw tables with Kusto. If at some point you're interested in learning how to get to this data, you can ask folks such as @ViktorHofer to show you how to use runfo, or I'd be happy to show you Kusto. either work.

@ghost ghost locked as resolved and limited conversation to collaborators Jul 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

System.Diagnostics.Tests.InstanceDataTests.InstanceDataCollectionCollection_CopyTo failing in CI
3 participants