From b494e503530acae8fa59aeb8eb53d54b85d9872b Mon Sep 17 00:00:00 2001 From: John Luo Date: Tue, 7 Aug 2018 11:50:09 -0700 Subject: [PATCH] Fixup shutdown functional tests --- test/Kestrel.FunctionalTests/Http2/ShutdownTests.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/Kestrel.FunctionalTests/Http2/ShutdownTests.cs b/test/Kestrel.FunctionalTests/Http2/ShutdownTests.cs index b03bc4fb64..0950898df1 100644 --- a/test/Kestrel.FunctionalTests/Http2/ShutdownTests.cs +++ b/test/Kestrel.FunctionalTests/Http2/ShutdownTests.cs @@ -44,8 +44,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests.Http2 [ConditionalFact] public async Task GracefulShutdownWaitsForRequestsToFinish() { - var requestStarted = new TaskCompletionSource(); - var requestUnblocked = new TaskCompletionSource(); + var requestStarted = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var requestUnblocked = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); using (var server = new TestServer(async context => { requestStarted.SetResult(null); @@ -84,8 +84,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests.Http2 [ConditionalFact] public async Task GracefulTurnsAbortiveIfRequestsDoNotFinish() { - var requestStarted = new TaskCompletionSource(); - var requestUnblocked = new TaskCompletionSource(); + var requestStarted = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var requestUnblocked = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); // Abortive shutdown leaves one request hanging using (var server = new TestServer(TransportSelector.GetWebHostBuilder(new DiagnosticMemoryPoolFactory(allowLateReturn: true).Create), async context => {