Skip to content

Commit 143a390

Browse files
authored
Fix hanging CORS test (#12006)
1 parent 0f02fac commit 143a390

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

src/Hosting/Server.IntegrationTesting/src/Deployers/SelfHostDeployer.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) .NET Foundation. All rights reserved.
1+
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

44
using System;
@@ -131,6 +131,12 @@ public override async Task<DeploymentResult> DeployAsync()
131131
WorkingDirectory = workingDirectory
132132
};
133133

134+
Logger.LogInformation($"Working directory {workingDirectory}");
135+
Logger.LogInformation($"{Directory.Exists(workingDirectory)}");
136+
Logger.LogInformation($"Filename {executableName}");
137+
Logger.LogInformation($"{File.Exists(executableName)}");
138+
Logger.LogInformation($"Arguments {executableArgs}");
139+
134140
AddEnvironmentVariablesToProcess(startInfo, DeploymentParameters.EnvironmentVariables);
135141

136142
Uri actualUrl = null;

src/Middleware/CORS/test/FunctionalTests/CORS.FunctionalTests.csproj

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFramework>netcoreapp3.0</TargetFramework>
@@ -16,6 +16,15 @@
1616
<ItemGroup>
1717
<!-- We don't need anything in this assembly, we just want to make sure it's built -->
1818
<ProjectReference Include="$(RepoRoot)src\Hosting\Server.IntegrationTesting\src\Microsoft.AspNetCore.Server.IntegrationTesting.csproj" />
19+
<ProjectReference Include="..\testassets\TestOrigin\TestOrigin.csproj">
20+
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
21+
</ProjectReference>
22+
<ProjectReference Include="..\testassets\TestDestination\TestDestination.csproj">
23+
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
24+
</ProjectReference>
25+
<ProjectReference Include="..\testassets\CorsMiddlewareWebSite\CorsMiddlewareWebSite.csproj">
26+
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
27+
</ProjectReference>
1928
</ItemGroup>
2029

2130
<ItemGroup>

src/Middleware/CORS/test/FunctionalTests/CorsMiddlewareFunctionalTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public CorsMiddlewareFunctionalTests(ITestOutputHelper output)
2828

2929
public ITestOutputHelper Output { get; }
3030

31-
[ConditionalTheory(Skip = "https://github.com/aspnet/AspNetCore/issues/11354")]
31+
[ConditionalTheory]
3232
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Disabling this test on OSX until we have a resolution for https://github.com/aspnet/AspNetCore-Internal/issues/1619")]
3333
[InlineData("Startup")]
3434
[InlineData("StartupWithoutEndpointRouting")]
@@ -98,7 +98,7 @@ private static async Task<CorsDeploymentResult> CreateDeployments(ILoggerFactory
9898
var originDeployment = await originFactory.DeployAsync();
9999

100100
var secondOriginFactory = ApplicationDeployerFactory.Create(originParameters, loggerFactory);
101-
var secondOriginDeployment = await originFactory.DeployAsync();
101+
var secondOriginDeployment = await secondOriginFactory.DeployAsync();
102102

103103
var port = originDeployment.HttpClient.BaseAddress.Port;
104104
var destinationParameters = new DeploymentParameters

0 commit comments

Comments
 (0)