Skip to content

Remove unreliable check in Rate Limiting test #114963

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

Merged

Conversation

tarekgh
Copy link
Member

@tarekgh tarekgh commented Apr 23, 2025

Fixes #114946

The removed check was not reliable enough to pass on slow environment like x86 debug which not guaranteed to handle enough events in the 3 second's window.

@Copilot Copilot AI review requested due to automatic review settings April 23, 2025 16:22
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes an unreliable minimum event count check from the Rate Limiting test to reduce test flakiness on slower environments like x86 debug.

  • Removed a check for at least 6 events to better handle timing variances
  • Maintains a tolerance-based check for upper-bound event count
Comments suppressed due to low confidence (1)

src/libraries/System.Diagnostics.DiagnosticSource/tests/DiagnosticSourceEventSourceBridgeTests.cs:1479

  • Removing the minimum events check improves test reliability but may reduce verification of basic event recording behavior. Consider adding an alternative, more reliable assertion to ensure that the DiagnosticSource still records a minimal level of activity.
Assert.True(eventSourceListener.EventCount >= 6, "${eventSourceListener.EventCount} events were recorded, while maxOpPerSecond is ${maxOpPerSecond}")

Copy link
Contributor

Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti
See info in area-owners.md if you want to be subscribed.

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.

TestRateLimitingSampler failing
2 participants