Skip to content

Commit

Permalink
Fix S6603 warnings (#2252)
Browse files Browse the repository at this point in the history
Fix two S6603 warnings.
  • Loading branch information
sukreshmanda authored Jul 29, 2024
1 parent 4b3b78f commit 411cfdc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions test/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,7 @@ public void Given_immediate_parallel_contention_ratelimiter_still_only_permits_o

// Act - release gate.
gate.Set();
#pragma warning disable S6603
Within(TimeSpan.FromSeconds(10 /* high to allow for slow-running on time-slicing CI servers */), () => tasks.All(t => t.IsCompleted).Should().BeTrue());
#pragma warning restore S6603
Within(TimeSpan.FromSeconds(10 /* high to allow for slow-running on time-slicing CI servers */), () => tasks.ToList().TrueForAll(t => t.IsCompleted).Should().BeTrue());

// Assert - one should have permitted execution, n-1 not.
var results = tasks.Select(t => t.Result).ToList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,7 @@ public void Given_immediate_parallel_contention_ratelimiter_still_only_permits_o

// Act - release gate.
gate.Set();
#pragma warning disable S6603
Within(TimeSpan.FromSeconds(10 /* high to allow for slow-running on time-slicing CI servers */), () => tasks.All(t => t.IsCompleted).Should().BeTrue());
#pragma warning restore S6603
Within(TimeSpan.FromSeconds(10 /* high to allow for slow-running on time-slicing CI servers */), () => tasks.ToList().TrueForAll(t => t.IsCompleted).Should().BeTrue());

// Assert - one should have permitted execution, n-1 not.
var results = tasks.Select(t => t.Result).ToList();
Expand Down

0 comments on commit 411cfdc

Please sign in to comment.