Skip to content

Commit 231a466

Browse files
reisenbergerYarekTyshchenko
authored andcommitted
Fix non-generic rate-limit tests to be genuinely non-generic
1 parent e06b0bc commit 231a466

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

src/Polly.Specs/RateLimit/AsyncRateLimitPolicySpecs.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ public void Dispose()
1818

1919
protected override IRateLimitPolicy GetPolicyViaSyntax(int numberOfExecutions, TimeSpan perTimeSpan)
2020
{
21-
return Policy.RateLimitAsync<ResultClassWithRetryAfter>(numberOfExecutions, perTimeSpan);
21+
return Policy.RateLimitAsync(numberOfExecutions, perTimeSpan);
2222
}
2323

2424
protected override IRateLimitPolicy GetPolicyViaSyntax(int numberOfExecutions, TimeSpan perTimeSpan, int maxBurst)
2525
{
26-
return Policy.RateLimitAsync<ResultClassWithRetryAfter>(numberOfExecutions, perTimeSpan, maxBurst);
26+
return Policy.RateLimitAsync(numberOfExecutions, perTimeSpan, maxBurst);
2727
}
2828

2929
protected override (bool, TimeSpan) TryExecuteThroughPolicy(IRateLimitPolicy policy)
3030
{
31-
if (policy is AsyncRateLimitPolicy<ResultClassWithRetryAfter> typedPolicy)
31+
if (policy is AsyncRateLimitPolicy typedPolicy)
3232
{
3333
try
3434
{

src/Polly.Specs/RateLimit/RateLimitPolicySpecs.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ public void Dispose()
1717

1818
protected override IRateLimitPolicy GetPolicyViaSyntax(int numberOfExecutions, TimeSpan perTimeSpan)
1919
{
20-
return Policy.RateLimit<ResultClassWithRetryAfter>(numberOfExecutions, perTimeSpan);
20+
return Policy.RateLimit(numberOfExecutions, perTimeSpan);
2121
}
2222

2323
protected override IRateLimitPolicy GetPolicyViaSyntax(int numberOfExecutions, TimeSpan perTimeSpan, int maxBurst)
2424
{
25-
return Policy.RateLimit<ResultClassWithRetryAfter>(numberOfExecutions, perTimeSpan, maxBurst);
25+
return Policy.RateLimit(numberOfExecutions, perTimeSpan, maxBurst);
2626
}
2727

2828
protected override (bool, TimeSpan) TryExecuteThroughPolicy(IRateLimitPolicy policy)
2929
{
30-
if (policy is RateLimitPolicy<ResultClassWithRetryAfter> typedPolicy)
30+
if (policy is RateLimitPolicy typedPolicy)
3131
{
3232
try
3333
{

src/Polly.Specs/RateLimit/RateLimitPolicyTResultSpecs.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using System.Threading.Tasks;
32
using Polly.RateLimit;
43
using Polly.Specs.Helpers;
54
using Polly.Specs.Helpers.RateLimit;

0 commit comments

Comments
 (0)