diff --git a/test/DotNetty.Codecs.Http.Tests/HttpClientCodecTest.cs b/test/DotNetty.Codecs.Http.Tests/HttpClientCodecTest.cs index d1ee5fcd3..70fcbbac1 100644 --- a/test/DotNetty.Codecs.Http.Tests/HttpClientCodecTest.cs +++ b/test/DotNetty.Codecs.Http.Tests/HttpClientCodecTest.cs @@ -163,7 +163,7 @@ class ClientHandler : SimpleChannelInboundHandler public bool WaitForCompletion() { - this.completion.Task.Wait(TimeSpan.FromSeconds(5)); + this.completion.Task.Wait(TimeSpan.FromSeconds(10)); return this.completion.Task.Status == TaskStatus.RanToCompletion; } @@ -180,7 +180,7 @@ class ServerHandler : SimpleChannelInboundHandler public bool WaitForCompletion() { - this.completion.Task.Wait(TimeSpan.FromSeconds(5)); + this.completion.Task.Wait(TimeSpan.FromSeconds(10)); return this.completion.Task.Status == TaskStatus.RanToCompletion; } @@ -196,8 +196,8 @@ protected override void ChannelRead0(IChannelHandlerContext ctx, IFullHttpReques * See RFC 7230, 3.3.3. */ - sChannel.WriteAndFlushAsync(Unpooled.WrappedBuffer(Encoding.UTF8.GetBytes("HTTP/1.0 200 OK\r\n" + "Date: Fri, 31 Dec 1999 23:59:59 GMT\r\n" + "Content-Type: text/html\r\n\r\n"))); - sChannel.WriteAndFlushAsync(Unpooled.WrappedBuffer(Encoding.UTF8.GetBytes("hello half closed!\r\n"))); + sChannel.WriteAndFlushAsync(Unpooled.WrappedBuffer(Encoding.UTF8.GetBytes("HTTP/1.0 200 OK\r\n" + "Date: Fri, 31 Dec 1999 23:59:59 GMT\r\n" + "Content-Type: text/html\r\n\r\n"))).GetAwaiter().GetResult(); + sChannel.WriteAndFlushAsync(Unpooled.WrappedBuffer(Encoding.UTF8.GetBytes("hello half closed!\r\n"))).GetAwaiter().GetResult(); sChannel.CloseAsync(); sChannel.CloseCompletion.LinkOutcome(this.completion); diff --git a/test/DotNetty.Codecs.Http2.Tests/DataCompressionHttp2Test.cs b/test/DotNetty.Codecs.Http2.Tests/DataCompressionHttp2Test.cs index 216242c7e..98ce0db67 100644 --- a/test/DotNetty.Codecs.Http2.Tests/DataCompressionHttp2Test.cs +++ b/test/DotNetty.Codecs.Http2.Tests/DataCompressionHttp2Test.cs @@ -177,9 +177,9 @@ public void Dispose() this.serverConnectedChannel = null; } Task.WaitAll( - this.sb.Group().ShutdownGracefullyAsync(TimeSpan.FromMilliseconds(100), TimeSpan.FromSeconds(5)), - this.sb.ChildGroup().ShutdownGracefullyAsync(TimeSpan.FromMilliseconds(100), TimeSpan.FromSeconds(5)), - this.cb.Group().ShutdownGracefullyAsync(TimeSpan.FromMilliseconds(100), TimeSpan.FromSeconds(5))); + this.sb.Group().ShutdownGracefullyAsync(TimeSpan.Zero, TimeSpan.Zero), + this.sb.ChildGroup().ShutdownGracefullyAsync(TimeSpan.Zero, TimeSpan.Zero), + this.cb.Group().ShutdownGracefullyAsync(TimeSpan.Zero, TimeSpan.Zero)); this.serverOut?.Close(); } @@ -430,8 +430,8 @@ private void BootstrapEnv(int serverOutSize) var port = ((IPEndPoint)this.serverChannel.LocalAddress).Port; var ccf = this.cb.ConnectAsync(loopback, port); this.clientChannel = ccf.GetAwaiter().GetResult(); - Assert.True(prefaceWrittenLatch.Wait(TimeSpan.FromSeconds(5))); - Assert.True(serverChannelLatch.Wait(TimeSpan.FromSeconds(5))); + Assert.True(prefaceWrittenLatch.Wait(TimeSpan.FromSeconds(10))); + Assert.True(serverChannelLatch.Wait(TimeSpan.FromSeconds(10))); } sealed class TestChannelHandlerAdapter : ChannelHandlerAdapter