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

Disallow TimeSpan.Zero in rate limiters #75496

Merged
merged 2 commits into from
Sep 26, 2022

Conversation

BrennanConroy
Copy link
Member

Forward port of change in release/7.0 from #74971

@ghost
Copy link

ghost commented Sep 13, 2022

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

Issue Details

Forward port of change in release/7.0 from #74971

Author: BrennanConroy
Assignees: -
Labels:

area-System.Threading

Milestone: -

@@ -71,6 +71,15 @@ public override void InvalidOptionsThrows()
Window = TimeSpan.FromMinutes(-2),
AutoReplenishment = false,
}));
Assert.Throws<ArgumentException>(
Copy link
Member

Choose a reason for hiding this comment

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

Ideally all of these Assert.Throws would instead be AssertExtensions.Throws and have a first argument that's the name of the argument we expect is being flagged as invalid.

Copy link
Member Author

Choose a reason for hiding this comment

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

Wasn't aware of those extensions 👍

@BrennanConroy BrennanConroy merged commit a889912 into dotnet:main Sep 26, 2022
@BrennanConroy BrennanConroy added this to the 8.0.0 milestone Sep 26, 2022
@BrennanConroy BrennanConroy deleted the brecon/fp branch September 26, 2022 17:22
@ghost ghost locked as resolved and limited conversation to collaborators Oct 26, 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.

2 participants