Skip to content

Commit 46d58a5

Browse files
authored
Clean up the extra data frames (#27750)
1 parent 9434691 commit 46d58a5

File tree

1 file changed

+0
-79
lines changed

1 file changed

+0
-79
lines changed

src/Servers/HttpSys/test/FunctionalTests/Http2Tests.cs

Lines changed: 0 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ namespace Microsoft.AspNetCore.Server.HttpSys.FunctionalTests
2323
{
2424
public class Http2Tests
2525
{
26-
// TODO: Remove when the regression is fixed.
27-
// https://github.com/dotnet/aspnetcore/issues/23164#issuecomment-652646163
28-
private static readonly Version Win10_Regressed_DataFrame = new Version(10, 0, 20145, 0);
29-
3026
[ConditionalFact]
3127
[MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10, SkipReason = "Http2 requires Win10")]
3228
public async Task EmptyResponse_200()
@@ -53,14 +49,6 @@ await h2Connection.ReceiveHeadersAsync(1, decodedHeaders =>
5349
});
5450

5551
var dataFrame = await h2Connection.ReceiveFrameAsync();
56-
if (Environment.OSVersion.Version >= Win10_Regressed_DataFrame)
57-
{
58-
// TODO: Remove when the regression is fixed.
59-
// https://github.com/dotnet/aspnetcore/issues/23164#issuecomment-652646163
60-
Http2Utilities.VerifyDataFrame(dataFrame, 1, endOfStream: false, length: 0);
61-
62-
dataFrame = await h2Connection.ReceiveFrameAsync();
63-
}
6452
Http2Utilities.VerifyDataFrame(dataFrame, 1, endOfStream: true, length: 0);
6553

6654
h2Connection.Logger.LogInformation("Connection stopped.");
@@ -152,14 +140,6 @@ await h2Connection.ReceiveHeadersAsync(1, decodedHeaders =>
152140
});
153141

154142
var dataFrame = await h2Connection.ReceiveFrameAsync();
155-
if (Environment.OSVersion.Version >= Win10_Regressed_DataFrame)
156-
{
157-
// TODO: Remove when the regression is fixed.
158-
// https://github.com/dotnet/aspnetcore/issues/23164#issuecomment-652646163
159-
Http2Utilities.VerifyDataFrame(dataFrame, 1, endOfStream: false, length: 0);
160-
161-
dataFrame = await h2Connection.ReceiveFrameAsync();
162-
}
163143
Http2Utilities.VerifyDataFrame(dataFrame, 1, endOfStream: true, length: 0);
164144

165145
h2Connection.Logger.LogInformation("Connection stopped.");
@@ -404,14 +384,6 @@ await h2Connection.ReceiveHeadersAsync(1, decodedHeaders =>
404384
});
405385

406386
var dataFrame = await h2Connection.ReceiveFrameAsync();
407-
if (Environment.OSVersion.Version >= Win10_Regressed_DataFrame)
408-
{
409-
// TODO: Remove when the regression is fixed.
410-
// https://github.com/dotnet/aspnetcore/issues/23164#issuecomment-652646163
411-
Http2Utilities.VerifyDataFrame(dataFrame, 1, endOfStream: false, length: 0);
412-
413-
dataFrame = await h2Connection.ReceiveFrameAsync();
414-
}
415387
Http2Utilities.VerifyDataFrame(dataFrame, 1, endOfStream: true, length: 0);
416388

417389
// Http.Sys doesn't send a final GoAway unless we ignore the first one and send 200 additional streams.
@@ -452,14 +424,6 @@ await h2Connection.ReceiveHeadersAsync(streamId, decodedHeaders =>
452424
});
453425

454426
var dataFrame = await h2Connection.ReceiveFrameAsync();
455-
if (Environment.OSVersion.Version >= Win10_Regressed_DataFrame)
456-
{
457-
// TODO: Remove when the regression is fixed.
458-
// https://github.com/dotnet/aspnetcore/issues/23164#issuecomment-652646163
459-
Http2Utilities.VerifyDataFrame(dataFrame, 1, endOfStream: false, length: 0);
460-
461-
dataFrame = await h2Connection.ReceiveFrameAsync();
462-
}
463427
Http2Utilities.VerifyDataFrame(dataFrame, streamId, endOfStream: true, length: 0);
464428

465429
// Http.Sys doesn't send a final GoAway unless we ignore the first one and send 200 additional streams.
@@ -477,14 +441,6 @@ await h2Connection.ReceiveHeadersAsync(streamId, decodedHeaders =>
477441
});
478442

479443
dataFrame = await h2Connection.ReceiveFrameAsync();
480-
if (Environment.OSVersion.Version >= Win10_Regressed_DataFrame)
481-
{
482-
// TODO: Remove when the regression is fixed.
483-
// https://github.com/dotnet/aspnetcore/issues/23164#issuecomment-652646163
484-
Http2Utilities.VerifyDataFrame(dataFrame, streamId, endOfStream: false, length: 0);
485-
486-
dataFrame = await h2Connection.ReceiveFrameAsync();
487-
}
488444
Http2Utilities.VerifyDataFrame(dataFrame, streamId, endOfStream: true, length: 0);
489445
}
490446

@@ -504,14 +460,6 @@ await h2Connection.ReceiveHeadersAsync(streamId, decodedHeaders =>
504460
});
505461

506462
dataFrame = await h2Connection.ReceiveFrameAsync();
507-
if (Environment.OSVersion.Version >= Win10_Regressed_DataFrame)
508-
{
509-
// TODO: Remove when the regression is fixed.
510-
// https://github.com/dotnet/aspnetcore/issues/23164#issuecomment-652646163
511-
Http2Utilities.VerifyDataFrame(dataFrame, streamId, endOfStream: false, length: 0);
512-
513-
dataFrame = await h2Connection.ReceiveFrameAsync();
514-
}
515463
Http2Utilities.VerifyDataFrame(dataFrame, streamId, endOfStream: true, length: 0);
516464

517465
h2Connection.Logger.LogInformation("Connection stopped.");
@@ -543,14 +491,6 @@ await h2Connection.ReceiveHeadersAsync(1, decodedHeaders =>
543491
});
544492

545493
var dataFrame = await h2Connection.ReceiveFrameAsync();
546-
if (Environment.OSVersion.Version >= Win10_Regressed_DataFrame)
547-
{
548-
// TODO: Remove when the regression is fixed.
549-
// https://github.com/dotnet/aspnetcore/issues/23164#issuecomment-652646163
550-
Http2Utilities.VerifyDataFrame(dataFrame, 1, endOfStream: false, length: 0);
551-
552-
dataFrame = await h2Connection.ReceiveFrameAsync();
553-
}
554494
Http2Utilities.VerifyDataFrame(dataFrame, 1, endOfStream: true, length: 0);
555495

556496
h2Connection.Logger.LogInformation("Connection stopped.");
@@ -616,14 +556,6 @@ await h2Connection.ReceiveHeadersAsync(1, decodedHeaders =>
616556
});
617557

618558
var frame = await h2Connection.ReceiveFrameAsync();
619-
if (Environment.OSVersion.Version >= Win10_Regressed_DataFrame)
620-
{
621-
// TODO: Remove when the regression is fixed.
622-
// https://github.com/dotnet/aspnetcore/issues/23164#issuecomment-652646163
623-
Http2Utilities.VerifyDataFrame(frame, 1, endOfStream: false, length: 0);
624-
625-
frame = await h2Connection.ReceiveFrameAsync();
626-
}
627559
Http2Utilities.VerifyResetFrame(frame, expectedStreamId: 1, Http2ErrorCode.INTERNAL_ERROR);
628560

629561
h2Connection.Logger.LogInformation("Connection stopped.");
@@ -752,9 +684,6 @@ await h2Connection.ReceiveHeadersAsync(1, decodedHeaders =>
752684
Assert.Equal("200", decodedHeaders[HeaderNames.Status]);
753685
});
754686

755-
var dataFrame = await h2Connection.ReceiveFrameAsync();
756-
Http2Utilities.VerifyDataFrame(dataFrame, expectedStreamId: 1, endOfStream: false, length: 0);
757-
758687
var resetFrame = await h2Connection.ReceiveFrameAsync();
759688
Http2Utilities.VerifyResetFrame(resetFrame, expectedStreamId: 1, expectedErrorCode: (Http2ErrorCode)1111);
760689

@@ -1008,14 +937,6 @@ await h2Connection.ReceiveHeadersAsync(1, decodedHeaders =>
1008937
});
1009938

1010939
var dataFrame = await h2Connection.ReceiveFrameAsync();
1011-
if (Environment.OSVersion.Version >= Win10_Regressed_DataFrame)
1012-
{
1013-
// TODO: Remove when the regression is fixed.
1014-
// https://github.com/dotnet/aspnetcore/issues/23164#issuecomment-652646163
1015-
Http2Utilities.VerifyDataFrame(dataFrame, 1, endOfStream: false, length: 0);
1016-
1017-
dataFrame = await h2Connection.ReceiveFrameAsync();
1018-
}
1019940
Http2Utilities.VerifyDataFrame(dataFrame, 1, endOfStream: true, length: 0);
1020941

1021942
var resetFrame = await h2Connection.ReceiveFrameAsync();

0 commit comments

Comments
 (0)