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

Commit

Permalink
Make ConnectionFilterTests more reliable
Browse files Browse the repository at this point in the history
  • Loading branch information
halter73 committed Nov 9, 2016
1 parent c0e75dc commit 3c7e7d1
Showing 1 changed file with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,19 @@ public async Task ThrowingSynchronousConnectionFilterDoesNotCrashServer()
using (var connection = server.CreateConnection())
{
// Will throw because the exception in the connection filter will close the connection.
await Assert.ThrowsAsync<IOException>(async () => await connection.SendEnd(
"POST / HTTP/1.0",
"Content-Length: 12",
"",
"Hello World?"));
await Assert.ThrowsAsync<IOException>(async () =>
{
await connection.Send(
"POST / HTTP/1.0",
"Content-Length: 1000",
"\r\n");

for (var i = 0; i < 1000; i++)
{
await connection.Send("a");
await Task.Delay(5);
}
});
}
}
}
Expand Down

0 comments on commit 3c7e7d1

Please sign in to comment.