From ade0dbadb337b19b476f308e2f6a0ef42a11f846 Mon Sep 17 00:00:00 2001 From: Ben Adams Date: Wed, 11 Nov 2015 13:06:15 +0000 Subject: [PATCH] Slow date wait for CI Resolves #339 --- .../DateHeaderValueManagerTests.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/Microsoft.AspNet.Server.KestrelTests/DateHeaderValueManagerTests.cs b/test/Microsoft.AspNet.Server.KestrelTests/DateHeaderValueManagerTests.cs index ca4fd8ff01..ef5e31ca6d 100644 --- a/test/Microsoft.AspNet.Server.KestrelTests/DateHeaderValueManagerTests.cs +++ b/test/Microsoft.AspNet.Server.KestrelTests/DateHeaderValueManagerTests.cs @@ -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