Skip to content

Commit 48f64d3

Browse files
authored
Decrease the minimum allowed timeout (#1888)
1 parent c3913c3 commit 48f64d3

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/Polly.Core/Timeout/TimeoutStrategyOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class TimeoutStrategyOptions : ResilienceStrategyOptions
1919
/// <value>
2020
/// This value must be greater than 1 second and less than 24 hours. The default value is 30 seconds.
2121
/// </value>
22-
[Range(typeof(TimeSpan), "00:00:01", "1.00:00:00")]
22+
[Range(typeof(TimeSpan), "00:00:00.010", "1.00:00:00")]
2323
[UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Addressed with DynamicDependency on ValidationHelper.Validate method")]
2424
public TimeSpan Timeout { get; set; } = TimeSpan.FromSeconds(30);
2525

test/Polly.Core.Tests/Timeout/TimeoutTestUtils.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@ public static class TimeoutTestUtils
1515
TimeSpan.Zero,
1616
TimeSpan.FromSeconds(-1),
1717
TimeSpan.FromHours(25),
18+
TimeSpan.FromMilliseconds(9),
1819
};
1920

2021
public static readonly TheoryData<TimeSpan> ValidTimeouts = new()
2122
{
2223
TimeSpan.FromSeconds(1),
2324
TimeSpan.FromHours(1),
25+
TimeSpan.FromMilliseconds(10),
26+
2427
};
2528
#pragma warning restore IDE0028
2629
}

0 commit comments

Comments
 (0)