parent
55f6f21d5a
commit
ade0dbadb3
|
|
@ -77,8 +77,8 @@ namespace Microsoft.AspNet.Server.KestrelTests
|
||||||
{
|
{
|
||||||
UtcNow = now
|
UtcNow = now
|
||||||
};
|
};
|
||||||
var timeWithoutRequestsUntilIdle = TimeSpan.FromMilliseconds(50);
|
var timeWithoutRequestsUntilIdle = TimeSpan.FromMilliseconds(250);
|
||||||
var timerInterval = TimeSpan.FromMilliseconds(10);
|
var timerInterval = TimeSpan.FromMilliseconds(100);
|
||||||
var dateHeaderValueManager = new DateHeaderValueManager(systemClock, timeWithoutRequestsUntilIdle, timerInterval);
|
var dateHeaderValueManager = new DateHeaderValueManager(systemClock, timeWithoutRequestsUntilIdle, timerInterval);
|
||||||
string result1;
|
string result1;
|
||||||
string result2;
|
string result2;
|
||||||
|
|
@ -87,8 +87,8 @@ namespace Microsoft.AspNet.Server.KestrelTests
|
||||||
{
|
{
|
||||||
result1 = dateHeaderValueManager.GetDateHeaderValue();
|
result1 = dateHeaderValueManager.GetDateHeaderValue();
|
||||||
systemClock.UtcNow = future;
|
systemClock.UtcNow = future;
|
||||||
// Wait for twice the idle timeout to ensure the timer is stopped
|
// Wait for longer than the idle timeout to ensure the timer is stopped
|
||||||
await Task.Delay(timeWithoutRequestsUntilIdle.Add(timeWithoutRequestsUntilIdle));
|
await Task.Delay(TimeSpan.FromSeconds(1));
|
||||||
result2 = dateHeaderValueManager.GetDateHeaderValue();
|
result2 = dateHeaderValueManager.GetDateHeaderValue();
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue