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()
280
280
281
281
// Dispose host prior to closing connection to verify the server doesn't throw during shutdown
282
282
// 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 ( ) ;
292
284
host . Dispose ( ) ;
293
285
}
294
286
}
295
287
// Allow appfunc to unblock
296
288
startReadingRequestBody . SetResult ( ) ;
297
289
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
+ }
299
303
}
300
304
301
305
private async Task < IHost > StartHost ( long ? maxRequestBufferSize ,
You can’t perform that action at this time.
0 commit comments