Clean up tests. (#9)

Motivation:

Our tests were failing as a result of the previous commit changing the
HTTP/2 lifecycle.

Modifications:

Fired channelActive in a few tests, correctly propagated
channelInactive.

Result:

Tests should pass.
This commit is contained in:
Cory Benfield authored and GitHub committed 2018-05-20 11:18:25 +01:00
1 parent d17462f586
commit 36321d080e
2 files changed
+3 -1

No files matched your search

-1
View File
@@ -192,7 +192,6 @@ public final class HTTP2Parser: ChannelInboundHandler, ChannelOutboundHandler {
public func channelInactive(ctx: ChannelHandlerContext) {
self.reentrancyManager.eofType = .channelInactive
self.reentrancyManager.process(ctx: ctx, self.process)
ctx.fireChannelInactive()
}
public func userInboundEventTriggered(ctx: ChannelHandlerContext, event: Any) {
+3
View File
@@ -79,6 +79,9 @@ extension XCTestCase {
func assertDoHandshake(client: EmbeddedChannel, server: EmbeddedChannel,
clientSettings: [HTTP2Setting] = nioDefaultSettings, serverSettings: [HTTP2Setting] = nioDefaultSettings,
file: StaticString = #file, line: UInt = #line) throws {
client.pipeline.fireChannelActive()
server.pipeline.fireChannelActive()
// First the channels need to interact.
self.interactInMemory(client, server, file: file, line: line)