|
1 | 1 | // Licensed to the .NET Foundation under one or more agreements.
|
2 | 2 | // The .NET Foundation licenses this file to you under the MIT license.
|
3 | 3 |
|
4 |
| -using System; |
5 |
| -using System.Collections.Generic; |
| 4 | +using System.Buffers; |
6 | 5 | using System.Net;
|
7 | 6 | using System.Net.Http;
|
8 | 7 | using System.Security.Cryptography.X509Certificates;
|
9 |
| -using System.Threading; |
10 |
| -using System.Threading.Tasks; |
11 | 8 | using Microsoft.AspNetCore.Hosting;
|
12 | 9 | using Microsoft.AspNetCore.Http;
|
| 10 | +using Microsoft.AspNetCore.InternalTesting; |
13 | 11 | using Microsoft.AspNetCore.Server.Kestrel.Core;
|
14 | 12 | using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2;
|
15 |
| -using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure; |
16 | 13 | using Microsoft.AspNetCore.Server.Kestrel.FunctionalTests;
|
17 |
| -using Microsoft.AspNetCore.InternalTesting; |
18 |
| -using Moq; |
19 |
| -using Xunit; |
20 | 14 |
|
21 | 15 | #if SOCKETS
|
22 | 16 | namespace Microsoft.AspNetCore.Server.Kestrel.Sockets.FunctionalTests.Http2;
|
@@ -173,11 +167,9 @@ public async Task GracefulTurnsAbortiveIfRequestsDoNotFinish()
|
173 | 167 | var requestStarted = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
|
174 | 168 | var requestUnblocked = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
|
175 | 169 |
|
176 |
| - var memoryPoolFactory = new DiagnosticMemoryPoolFactory(allowLateReturn: true); |
177 |
| - |
178 | 170 | var testContext = new TestServiceContext(LoggerFactory)
|
179 | 171 | {
|
180 |
| - MemoryPoolFactory = memoryPoolFactory.Create |
| 172 | + MemoryPoolFactory = () => new PinnedBlockMemoryPool() |
181 | 173 | };
|
182 | 174 |
|
183 | 175 | ThrowOnUngracefulShutdown = false;
|
@@ -227,7 +219,5 @@ public async Task GracefulTurnsAbortiveIfRequestsDoNotFinish()
|
227 | 219 | Assert.Contains(LogMessages, m => m.Message.Contains("is closed. The last processed stream ID was 1."));
|
228 | 220 | Assert.Contains(LogMessages, m => m.Message.Contains("Some connections failed to close gracefully during server shutdown."));
|
229 | 221 | Assert.DoesNotContain(LogMessages, m => m.Message.Contains("Request finished in"));
|
230 |
| - |
231 |
| - await memoryPoolFactory.WhenAllBlocksReturned(TestConstants.DefaultTimeout); |
232 | 222 | }
|
233 | 223 | }
|
0 commit comments