Skip to content

Commit 68bbb20

Browse files
committed
Remove commented out code
1 parent b767b2b commit 68bbb20

File tree

1 file changed

+0
-50
lines changed

1 file changed

+0
-50
lines changed

Tests/NIOHTTP1Tests/HTTPClientUpgradeTests.swift

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,56 +1138,6 @@ final class TypedHTTPClientUpgradeTestCase: HTTPClientUpgradeTestCase {
11381138
break
11391139
}
11401140
}
1141-
/*let channel = EmbeddedChannel()
1142-
1143-
if let previousHTTPHandler {
1144-
try channel.pipeline.syncOperations.addHandler(previousHTTPHandler)
1145-
}
1146-
var headers = HTTPHeaders()
1147-
headers.add(name: "Content-Type", value: "text/plain; charset=utf-8")
1148-
headers.add(name: "Content-Length", value: "\(0)")
1149-
1150-
let requestHead = HTTPRequestHead(
1151-
version: .http1_1,
1152-
method: .GET,
1153-
uri: "/",
1154-
headers: headers
1155-
)
1156-
1157-
let upgraders: [any NIOTypedHTTPClientProtocolUpgrader<Bool>] = Array(
1158-
clientUpgraders.map { $0 as! any NIOTypedHTTPClientProtocolUpgrader<Bool> }
1159-
)
1160-
1161-
let config = NIOTypedHTTPClientUpgradeConfiguration<Bool>(
1162-
upgradeRequestHead: requestHead,
1163-
upgraders: upgraders
1164-
) { channel in
1165-
channel.eventLoop.makeCompletedFuture {
1166-
try channel.pipeline.syncOperations.addHandler(clientHTTPHandler)
1167-
}.map { _ in
1168-
false
1169-
}
1170-
}
1171-
var configuration = NIOUpgradableHTTPClientPipelineConfiguration(upgradeConfiguration: config)
1172-
configuration.leftOverBytesStrategy = .forwardBytes
1173-
let upgradeResult = try channel.pipeline.syncOperations.configureUpgradableHTTPClientPipeline(
1174-
configuration: configuration
1175-
)
1176-
let context = try channel.pipeline.syncOperations.context(
1177-
handlerType: NIOTypedHTTPClientUpgradeHandler<Bool>.self
1178-
)
1179-
1180-
let loopBoundContext = context.loopBound
1181-
try channel.connect(to: SocketAddress(ipAddress: "127.0.0.1", port: 0))
1182-
.wait()
1183-
upgradeResult.whenSuccess { result in
1184-
if result {
1185-
let context = loopBoundContext.value
1186-
upgradeCompletionHandler(context)
1187-
}
1188-
}
1189-
1190-
return channel*/
11911141
}
11921142

11931143
// - MARK: The following tests are all overridden from the base class since they slightly differ in behaviour

0 commit comments

Comments
 (0)