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

Improve .NET 8 metrics tests #4976

Closed
JamesNK opened this issue Oct 21, 2023 · 4 comments
Closed

Improve .NET 8 metrics tests #4976

JamesNK opened this issue Oct 21, 2023 · 4 comments
Labels
infra Infra work - CI/CD, code coverage, linters Stale Issues and pull requests which have been flagged for closing due to inactivity

Comments

@JamesNK
Copy link
Contributor

JamesNK commented Oct 21, 2023

Bug Report

Symptom

The tests added in #4934 need improvement.

  • Tests start a web application with socket hard coded to 5000. Test will fail if run in parallel, or another test isn't cleaned up properly, or the machine already has a site running on port 5000
  • Tests use Task.Delay to wait for metric result. This slows down test execution and is potentially flaky.

What is the expected behavior?

  • Test website uses TestServer and runs in memory.
  • Test awaits the metric result to be available. This can be done easily with MetricCollector which has a WaitForMeasurementsAsync method.

What is the actual behavior?

See symptom.

Reproduce

n/a

Additional Context

Add any other context about the problem here.

@JamesNK JamesNK added the bug Something isn't working label Oct 21, 2023
@JamesNK
Copy link
Contributor Author

JamesNK commented Oct 21, 2023

There is documentation here for how to test ASP.NET Core metrics in a correct, stable and efficent manner.

@JamesNK
Copy link
Contributor Author

JamesNK commented Oct 21, 2023

@cijothomas cijothomas added infra Infra work - CI/CD, code coverage, linters and removed bug Something isn't working labels Oct 23, 2023
Copy link
Contributor

This issue was marked stale due to lack of activity and will be closed in 7 days. Commenting will instruct the bot to automatically remove the label. This bot runs once per day.

@github-actions github-actions bot added the Stale Issues and pull requests which have been flagged for closing due to inactivity label Oct 15, 2024
Copy link
Contributor

Closed as inactive. Feel free to reopen if this issue is still a concern.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra Infra work - CI/CD, code coverage, linters Stale Issues and pull requests which have been flagged for closing due to inactivity
Projects
None yet
Development

No branches or pull requests

2 participants