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