diff --git a/test/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs b/test/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs index 448d6e65b51..14e322f9fea 100644 --- a/test/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs +++ b/test/Polly.Specs/RateLimit/RateLimitPolicySpecsBase.cs @@ -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(); diff --git a/test/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs b/test/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs index 18aa01a3a9a..153571b62ec 100644 --- a/test/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs +++ b/test/Polly.Specs/RateLimit/TokenBucketRateLimiterTestsBase.cs @@ -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();