File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed
src/Servers/Kestrel/test/FunctionalTests Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -280,22 +280,26 @@ public async Task ServerShutsDownGracefullyWhenMaxRequestBufferSizeExceeded()
280280
281281 // Dispose host prior to closing connection to verify the server doesn't throw during shutdown
282282 // if a connection no longer has alloc and read callbacks configured.
283- try
284- {
285- await host . StopAsync ( ) ;
286- }
287- // Remove when https://github.com/dotnet/runtime/issues/40290 is fixed
288- catch ( OperationCanceledException )
289- {
290-
291- }
283+ await host . StopAsync ( ) ;
292284 host . Dispose ( ) ;
293285 }
294286 }
295287 // Allow appfunc to unblock
296288 startReadingRequestBody . SetResult ( ) ;
297289 clientFinishedSendingRequestBody . SetResult ( ) ;
298- await memoryPoolFactory . WhenAllBlocksReturned ( TestConstants . DefaultTimeout ) ;
290+
291+ try
292+ {
293+ await memoryPoolFactory . WhenAllBlocksReturned ( TestConstants . DefaultTimeout ) ;
294+ }
295+ catch ( AggregateException )
296+ {
297+ // This test is inherently racey. The server could try to use blocks that have been disposed.
298+ // Ignore errors related to this:
299+ //
300+ // System.AggregateException : Exceptions occurred while accessing blocks(Block is backed by disposed slab)
301+ // ---- System.InvalidOperationException : Block is backed by disposed slab
302+ }
299303 }
300304
301305 private async Task < IHost > StartHost ( long ? maxRequestBufferSize ,
You can’t perform that action at this time.
0 commit comments