Skip to content

Commit

Permalink
Fix broken upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasa committed Dec 13, 2024
1 parent aa646a8 commit 6fbecdd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Tests/NIOWebSocketTests/WebSocketClientEndToEndTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,6 @@ final class TypedWebSocketClientEndToEndTests: WebSocketClientEndToEndTests {
}

override fileprivate func runSuccessfulUpgrade() throws -> (EmbeddedChannel, WebSocketRecorderHandler) {
let handler = WebSocketRecorderHandler()

let basicUpgrader = NIOTypedWebSocketClientUpgrader(
requestKey: "OfS0wDaT5NoxF2gqm7Zj2YtetzM=",
upgradePipelineHandler: { (channel: Channel, _: HTTPResponseHead) in
Expand Down Expand Up @@ -716,6 +714,10 @@ final class TypedWebSocketClientEndToEndTests: WebSocketClientEndToEndTests {

try upgradeResult.wait()

// Ok, now grab the handler. We can do this with sync operations, because this is an
// EmbeddedChannel.
let handler = try clientChannel.pipeline.syncOperations.handler(type: WebSocketRecorderHandler.self)

return (clientChannel, handler)
}
}
Expand Down

0 comments on commit 6fbecdd

Please sign in to comment.