mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-22 04:30:43 +00:00
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:
1 parent
d17462f586
commit
36321d080e
2 files changed
+3
-1
No files matched your search
@@ -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) {
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in new issue
Block a user