From 5c330373376c1beead4296529e0907773355e53f Mon Sep 17 00:00:00 2001 From: Chris R Date: Tue, 27 Oct 2015 10:55:37 -0700 Subject: [PATCH] Lower integration test timeouts. --- .../HelloWorldTest.cs | 8 ++++++-- .../HttpsTest.cs | 8 ++++++-- .../NtlmAuthentationTest.cs | 8 ++++++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/test/Microsoft.AspNet.IISPlatformHandler.FunctionalTests/HelloWorldTest.cs b/test/Microsoft.AspNet.IISPlatformHandler.FunctionalTests/HelloWorldTest.cs index 9514c887c7..9f479af422 100644 --- a/test/Microsoft.AspNet.IISPlatformHandler.FunctionalTests/HelloWorldTest.cs +++ b/test/Microsoft.AspNet.IISPlatformHandler.FunctionalTests/HelloWorldTest.cs @@ -74,13 +74,17 @@ namespace Microsoft.AspNet.IISPlatformHandler.FunctionalTests { var deploymentResult = deployer.Deploy(); var httpClientHandler = new HttpClientHandler(); - var httpClient = new HttpClient(httpClientHandler) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; + var httpClient = new HttpClient(httpClientHandler) + { + BaseAddress = new Uri(deploymentResult.ApplicationBaseUri), + Timeout = TimeSpan.FromSeconds(5), + }; // Request to base address and check if various parts of the body are rendered & measure the cold startup time. var response = await RetryHelper.RetryRequest(() => { return httpClient.GetAsync(string.Empty); - }, logger, deploymentResult.HostShutdownToken); + }, logger, deploymentResult.HostShutdownToken, retryCount: 30); var responseText = await response.Content.ReadAsStringAsync(); try diff --git a/test/Microsoft.AspNet.IISPlatformHandler.FunctionalTests/HttpsTest.cs b/test/Microsoft.AspNet.IISPlatformHandler.FunctionalTests/HttpsTest.cs index 9df614b099..121288c0d6 100644 --- a/test/Microsoft.AspNet.IISPlatformHandler.FunctionalTests/HttpsTest.cs +++ b/test/Microsoft.AspNet.IISPlatformHandler.FunctionalTests/HttpsTest.cs @@ -48,13 +48,17 @@ namespace Microsoft.AspNet.IISPlatformHandler.FunctionalTests var deploymentResult = deployer.Deploy(); var handler = new WebRequestHandler(); handler.ServerCertificateValidationCallback = (a, b, c, d) => true; - var httpClient = new HttpClient(handler) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; + var httpClient = new HttpClient(handler) + { + BaseAddress = new Uri(deploymentResult.ApplicationBaseUri), + Timeout = TimeSpan.FromSeconds(5), + }; // Request to base address and check if various parts of the body are rendered & measure the cold startup time. var response = await RetryHelper.RetryRequest(() => { return httpClient.GetAsync(string.Empty); - }, logger, deploymentResult.HostShutdownToken); + }, logger, deploymentResult.HostShutdownToken, retryCount: 30); var responseText = await response.Content.ReadAsStringAsync(); try diff --git a/test/Microsoft.AspNet.IISPlatformHandler.FunctionalTests/NtlmAuthentationTest.cs b/test/Microsoft.AspNet.IISPlatformHandler.FunctionalTests/NtlmAuthentationTest.cs index 893550bc2f..044b1d079d 100644 --- a/test/Microsoft.AspNet.IISPlatformHandler.FunctionalTests/NtlmAuthentationTest.cs +++ b/test/Microsoft.AspNet.IISPlatformHandler.FunctionalTests/NtlmAuthentationTest.cs @@ -42,13 +42,17 @@ namespace Microsoft.AspNet.IISPlatformHandler.FunctionalTests { var deploymentResult = deployer.Deploy(); var httpClientHandler = new HttpClientHandler(); - var httpClient = new HttpClient(httpClientHandler) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; + var httpClient = new HttpClient(httpClientHandler) + { + BaseAddress = new Uri(deploymentResult.ApplicationBaseUri), + Timeout = TimeSpan.FromSeconds(5), + }; // Request to base address and check if various parts of the body are rendered & measure the cold startup time. var response = await RetryHelper.RetryRequest(() => { return httpClient.GetAsync(string.Empty); - }, logger, deploymentResult.HostShutdownToken); + }, logger, deploymentResult.HostShutdownToken, retryCount: 30); var responseText = await response.Content.ReadAsStringAsync(); try