Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Commit 5b20652

Browse files
author
Cesar Blum Silveira
committed
Fix failing keep-alive timeout tests.
1 parent f2085b1 commit 5b20652

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

test/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests/KeepAliveTimeoutTests.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,17 +97,21 @@ await connection.Send(
9797
"GET / HTTP/1.1",
9898
"",
9999
"");
100-
await ReceiveResponse(connection, server.Context);
101100
await Task.Delay(ShortDelay);
102101
}
102+
103+
for (var i = 0; i < 10; i++)
104+
{
105+
await ReceiveResponse(connection, server.Context);
106+
}
103107
}
104108
}
105109

106110
private async Task KeepAliveTimeoutResetsBetweenChunkedRequests(TestServer server)
107111
{
108112
using (var connection = new TestConnection(server.Port))
109113
{
110-
for (var i = 0; i < 5; i++)
114+
for (var i = 0; i < 10; i++)
111115
{
112116
await connection.Send(
113117
"POST / HTTP/1.1",
@@ -118,9 +122,13 @@ await connection.Send(
118122
"0",
119123
"",
120124
"");
121-
await ReceiveResponse(connection, server.Context);
122125
await Task.Delay(ShortDelay);
123126
}
127+
128+
for (var i = 0; i < 10; i++)
129+
{
130+
await ReceiveResponse(connection, server.Context);
131+
}
124132
}
125133
}
126134

0 commit comments

Comments
 (0)