Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Http2.Tests-DevOps #22

Merged
merged 3 commits into from
Sep 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/DotNetty.Codecs.Http.Tests/HttpClientCodecTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class ClientHandler : SimpleChannelInboundHandler<IFullHttpResponse>

public bool WaitForCompletion()
{
this.completion.Task.Wait(TimeSpan.FromSeconds(5));
this.completion.Task.Wait(TimeSpan.FromSeconds(10));
return this.completion.Task.Status == TaskStatus.RanToCompletion;
}

Expand All @@ -180,7 +180,7 @@ class ServerHandler : SimpleChannelInboundHandler<IFullHttpRequest>

public bool WaitForCompletion()
{
this.completion.Task.Wait(TimeSpan.FromSeconds(5));
this.completion.Task.Wait(TimeSpan.FromSeconds(10));
return this.completion.Task.Status == TaskStatus.RanToCompletion;
}

Expand All @@ -196,8 +196,8 @@ protected override void ChannelRead0(IChannelHandlerContext ctx, IFullHttpReques
* See <a href="https://tools.ietf.org/html/rfc7230#section-3.3.3">RFC 7230, 3.3.3</a>.
*/

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("<html><body>hello half closed!</body></html>\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("<html><body>hello half closed!</body></html>\r\n"))).GetAwaiter().GetResult();
sChannel.CloseAsync();

sChannel.CloseCompletion.LinkOutcome(this.completion);
Expand Down
10 changes: 5 additions & 5 deletions test/DotNetty.Codecs.Http2.Tests/DataCompressionHttp2Test.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down Expand Up @@ -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
Expand Down