Fix tests hanging

This commit is contained in:
BrennanConroy 2016-06-13 09:52:47 -07:00
parent 33ae9d069e
commit 7d2ec5b37b
2 changed files with 4 additions and 2 deletions

View File

@ -36,7 +36,7 @@ namespace Microsoft.AspNetCore.Server.Testing
try try
{ {
logger.LogWarning("Retry count {retryCount}..", retry + 1); logger.LogWarning("Retry count {retryCount}..", retry + 1);
var response = await retryBlock(); var response = await retryBlock().ConfigureAwait(false);
if (response.StatusCode == HttpStatusCode.ServiceUnavailable) if (response.StatusCode == HttpStatusCode.ServiceUnavailable)
{ {

View File

@ -46,7 +46,7 @@ namespace Microsoft.AspNetCore.Server.Testing
var response = RetryHelper.RetryRequest(() => var response = RetryHelper.RetryRequest(() =>
{ {
return httpClient.GetAsync(redirectUri); return httpClient.GetAsync(redirectUri);
}, Logger).Result; }, Logger, exitToken).Result;
if (!response.IsSuccessStatusCode) if (!response.IsSuccessStatusCode)
{ {
@ -68,6 +68,8 @@ namespace Microsoft.AspNetCore.Server.Testing
// copy nginx.conf template and replace pertinent information // copy nginx.conf template and replace pertinent information
DeploymentParameters.ServerConfigTemplateContent = DeploymentParameters.ServerConfigTemplateContent DeploymentParameters.ServerConfigTemplateContent = DeploymentParameters.ServerConfigTemplateContent
.Replace("[user]", Environment.GetEnvironmentVariable("LOGNAME")) .Replace("[user]", Environment.GetEnvironmentVariable("LOGNAME"))
.Replace("[errorlog]", Path.Combine(DeploymentParameters.ApplicationPath, "nginx.error.log"))
.Replace("[accesslog]", Path.Combine(DeploymentParameters.ApplicationPath, "nginx.access.log"))
.Replace("[listenPort]", originalUri.Port.ToString()) .Replace("[listenPort]", originalUri.Port.ToString())
.Replace("[redirectUri]", redirectUri) .Replace("[redirectUri]", redirectUri)
.Replace("[pidFile]", Path.Combine(DeploymentParameters.ApplicationPath, Guid.NewGuid().ToString())); .Replace("[pidFile]", Path.Combine(DeploymentParameters.ApplicationPath, Guid.NewGuid().ToString()));