System.ArgumentOutOfRangeException when Timeout.InfiniteTimeSpan used as an argument for IResponseBuilder.WithDelay() #415

Closed
opened 2025-12-29 15:23:14 +01:00 by adam · 1 comment
Owner

Originally created by @xzxzxc on GitHub (Apr 7, 2022).

Originally assigned to: @StefH on GitHub.

Describe the bug

Next code fails with
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'delay')

Response.Create().WithDelay(Timeout.InfiniteTimeSpan);

Expected behavior:

Method WithDelay should allow infinite timeout.

WireMock.Net version 1.4.40

Originally created by @xzxzxc on GitHub (Apr 7, 2022). Originally assigned to: @StefH on GitHub. ### Describe the bug Next code fails with `System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'delay')` ``` c# Response.Create().WithDelay(Timeout.InfiniteTimeSpan); ``` ### Expected behavior: Method `WithDelay` should allow infinite timeout. ### Other related info WireMock.Net version 1.4.40
adam added the bug label 2025-12-29 15:23:14 +01:00
adam closed this issue 2025-12-29 15:23:14 +01:00
Author
Owner

@StefH commented on GitHub (Apr 11, 2022):

InfiniteTimeSpan is a long time ;-)

@StefH commented on GitHub (Apr 11, 2022): InfiniteTimeSpan is a long time ;-)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#415