From 143a3900fbbd1af6f54b4b1e64f538008e1236df Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Thu, 11 Jul 2019 08:40:55 -0700 Subject: [PATCH] Fix hanging CORS test (#12006) --- .../src/Deployers/SelfHostDeployer.cs | 8 +++++++- .../test/FunctionalTests/CORS.FunctionalTests.csproj | 11 ++++++++++- .../FunctionalTests/CorsMiddlewareFunctionalTest.cs | 4 ++-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/Hosting/Server.IntegrationTesting/src/Deployers/SelfHostDeployer.cs b/src/Hosting/Server.IntegrationTesting/src/Deployers/SelfHostDeployer.cs index ae6a7a08af..e6e724c98c 100644 --- a/src/Hosting/Server.IntegrationTesting/src/Deployers/SelfHostDeployer.cs +++ b/src/Hosting/Server.IntegrationTesting/src/Deployers/SelfHostDeployer.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -131,6 +131,12 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting WorkingDirectory = workingDirectory }; + Logger.LogInformation($"Working directory {workingDirectory}"); + Logger.LogInformation($"{Directory.Exists(workingDirectory)}"); + Logger.LogInformation($"Filename {executableName}"); + Logger.LogInformation($"{File.Exists(executableName)}"); + Logger.LogInformation($"Arguments {executableArgs}"); + AddEnvironmentVariablesToProcess(startInfo, DeploymentParameters.EnvironmentVariables); Uri actualUrl = null; diff --git a/src/Middleware/CORS/test/FunctionalTests/CORS.FunctionalTests.csproj b/src/Middleware/CORS/test/FunctionalTests/CORS.FunctionalTests.csproj index 1813a56d69..cb106651e5 100644 --- a/src/Middleware/CORS/test/FunctionalTests/CORS.FunctionalTests.csproj +++ b/src/Middleware/CORS/test/FunctionalTests/CORS.FunctionalTests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.0 @@ -16,6 +16,15 @@ + + False + + + False + + + False + diff --git a/src/Middleware/CORS/test/FunctionalTests/CorsMiddlewareFunctionalTest.cs b/src/Middleware/CORS/test/FunctionalTests/CorsMiddlewareFunctionalTest.cs index 430330f249..07667df68a 100644 --- a/src/Middleware/CORS/test/FunctionalTests/CorsMiddlewareFunctionalTest.cs +++ b/src/Middleware/CORS/test/FunctionalTests/CorsMiddlewareFunctionalTest.cs @@ -28,7 +28,7 @@ namespace FunctionalTests public ITestOutputHelper Output { get; } - [ConditionalTheory(Skip = "https://github.com/aspnet/AspNetCore/issues/11354")] + [ConditionalTheory] [OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Disabling this test on OSX until we have a resolution for https://github.com/aspnet/AspNetCore-Internal/issues/1619")] [InlineData("Startup")] [InlineData("StartupWithoutEndpointRouting")] @@ -98,7 +98,7 @@ namespace FunctionalTests var originDeployment = await originFactory.DeployAsync(); var secondOriginFactory = ApplicationDeployerFactory.Create(originParameters, loggerFactory); - var secondOriginDeployment = await originFactory.DeployAsync(); + var secondOriginDeployment = await secondOriginFactory.DeployAsync(); var port = originDeployment.HttpClient.BaseAddress.Port; var destinationParameters = new DeploymentParameters