mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-19 15:01:18 +02:00
Allow Timeout.InfiniteTimeSpan for WithDelay (#746)
* Update WithDelay * Allow Timeout.InfiniteTimeSpan for WithDelay
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using Stef.Validation;
|
||||
using WireMock.Admin.Mappings;
|
||||
using WireMock.Matchers.Request;
|
||||
@@ -90,7 +92,7 @@ namespace WireMock.Serialization
|
||||
}
|
||||
else
|
||||
{
|
||||
mappingModel.Response.Delay = (int?)response.Delay?.TotalMilliseconds;
|
||||
mappingModel.Response.Delay = (int?)(response.Delay == Timeout.InfiniteTimeSpan ? TimeSpan.MaxValue.TotalMilliseconds : response.Delay?.TotalMilliseconds);
|
||||
}
|
||||
|
||||
if (mapping.Webhooks?.Length == 1)
|
||||
|
||||
Reference in New Issue
Block a user