Slow date wait for CI

Resolves #339
This commit is contained in:
Ben Adams 2015-11-11 13:06:15 +00:00
parent 55f6f21d5a
commit ade0dbadb3
1 changed files with 4 additions and 4 deletions

View File

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