Skip to content

Commit d5a4962

Browse files
Fix InjectedStartup_DefaultApplicationNameIsEntryAssembly (#57554)
1 parent 232255e commit d5a4962

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/Hosting/test/FunctionalTests/WebHostBuilderTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ public async Task InjectedStartup_DefaultApplicationNameIsEntryAssembly(TestVari
4444
if (!string.IsNullOrWhiteSpace(data))
4545
{
4646
output += data + '\n';
47-
tcs.TrySetResult();
4847
}
4948
};
5049

51-
await deployer.DeployAsync();
50+
var deploymentResult = await deployer.DeployAsync();
51+
deploymentResult.HostShutdownToken.Register(tcs.SetResult);
5252

5353
try
5454
{

src/Hosting/test/testassets/IStartupInjectionAssemblyName/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ public static void Main(string[] args)
1414
var webHost = CreateWebHostBuilder(args).Build();
1515
var applicationName = webHost.Services.GetRequiredService<IHostEnvironment>().ApplicationName;
1616
Console.WriteLine(applicationName);
17-
Console.ReadKey();
1817
}
1918

2019
// Do not change the signature of this method. It's used for tests.

0 commit comments

Comments
 (0)