File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/Servers/Kestrel/test/FunctionalTests Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1206,7 +1206,12 @@ await connection.Send("POST / HTTP/1.1",
1206
1206
}
1207
1207
}
1208
1208
1209
- await Assert . ThrowsAsync < TaskCanceledException > ( async ( ) => await readTcs . Task ) ;
1209
+ var thrownEx = await Assert . ThrowsAnyAsync < Exception > ( async ( ) => await readTcs . Task ) ;
1210
+
1211
+ // https://github.com/aspnet/AspNetCore-Internal/issues/1521
1212
+ // In more recent versions of Kestrel, we expect this to always be a TaskCanceledException,
1213
+ // but without the changes in https://github.com/aspnet/KestrelHttpServer/pull/2844, this is flaky.
1214
+ Assert . True ( thrownEx is TaskCanceledException || thrownEx is IOException , $ "{ thrownEx } is neither a TaskCanceledException nor IOException.") ;
1210
1215
1211
1216
// The cancellation token for only the last request should be triggered.
1212
1217
var abortedRequestId = await registrationTcs . Task ;
You can’t perform that action at this time.
0 commit comments