Skip to content

Commit 5bf0bf6

Browse files
committed
fix merge conflicts
1 parent 7a1d625 commit 5bf0bf6

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

Diff for: Tests/AsyncHTTPClientTests/HTTP2ClientTests.swift

+16-19
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,13 @@ class HTTP2ClientTests: XCTestCase {
2727
func makeDefaultHTTPClient(
2828
eventLoopGroupProvider: HTTPClient.EventLoopGroupProvider = .createNew
2929
) -> HTTPClient {
30-
var tlsConfig = TLSConfiguration.makeClientConfiguration()
31-
tlsConfig.certificateVerification = .none
30+
var config = HTTPClient.Configuration()
31+
config.tlsConfiguration = .clientDefault
32+
config.tlsConfiguration?.certificateVerification = .none
33+
config.httpVersion = .automatic
3234
return HTTPClient(
3335
eventLoopGroupProvider: eventLoopGroupProvider,
34-
configuration: HTTPClient.Configuration(
35-
tlsConfiguration: tlsConfig,
36-
httpVersion: .automatic
37-
),
36+
configuration: config,
3837
backgroundActivityLogger: Logger(label: "HTTPClient", factory: StreamLogHandler.standardOutput(label:))
3938
)
4039
}
@@ -137,14 +136,13 @@ class HTTP2ClientTests: XCTestCase {
137136

138137
let localHTTPBin = HTTPBin(.http2(compress: false))
139138
let elg = MultiThreadedEventLoopGroup(numberOfThreads: numberOfWorkers)
140-
var tlsConfig = TLSConfiguration.makeClientConfiguration()
141-
tlsConfig.certificateVerification = .none
139+
var config = HTTPClient.Configuration()
140+
config.tlsConfiguration = .clientDefault
141+
config.tlsConfiguration?.certificateVerification = .none
142+
config.httpVersion = .automatic
142143
let localClient = HTTPClient(
143144
eventLoopGroupProvider: .shared(elg),
144-
configuration: HTTPClient.Configuration(
145-
tlsConfiguration: tlsConfig,
146-
httpVersion: .automatic
147-
),
145+
configuration: config,
148146
backgroundActivityLogger: Logger(label: "HTTPClient", factory: StreamLogHandler.standardOutput(label:))
149147
)
150148
defer {
@@ -302,15 +300,14 @@ class HTTP2ClientTests: XCTestCase {
302300
let el1 = clientGroup.next()
303301
let el2 = clientGroup.next()
304302
defer { XCTAssertNoThrow(try clientGroup.syncShutdownGracefully()) }
305-
var tlsConfig = TLSConfiguration.makeClientConfiguration()
306-
tlsConfig.certificateVerification = .none
303+
var config = HTTPClient.Configuration()
304+
config.tlsConfiguration = .clientDefault
305+
config.tlsConfiguration?.certificateVerification = .none
306+
config.httpVersion = .automatic
307+
config.timeout.connect = .milliseconds(1000)
307308
let client = HTTPClient(
308309
eventLoopGroupProvider: .shared(clientGroup),
309-
configuration: HTTPClient.Configuration(
310-
tlsConfiguration: tlsConfig,
311-
timeout: .init(connect: .milliseconds(1000)),
312-
httpVersion: .automatic
313-
),
310+
configuration: config,
314311
backgroundActivityLogger: Logger(label: "HTTPClient", factory: StreamLogHandler.standardOutput(label:))
315312
)
316313
defer { XCTAssertNoThrow(try client.syncShutdown()) }

0 commit comments

Comments
 (0)