mirror of
https://github.com/swift-server/async-http-client.git
synced 2026-06-02 07:37:34 +00:00
Fix tests (#356)
This commit is contained in:
@@ -2711,7 +2711,10 @@ class HTTPClientTests: XCTestCase {
|
||||
if isTestingNIOTS() {
|
||||
XCTAssertEqual(error as? ChannelError, .connectTimeout(.milliseconds(100)))
|
||||
} else {
|
||||
XCTAssertEqual(error as? NIOSSLError, NIOSSLError.uncleanShutdown)
|
||||
switch error as? NIOSSLError {
|
||||
case .some(.handshakeFailed(.sslError(_))): break
|
||||
default: XCTFail("Handshake failed with unexpected error: \(String(describing: error))")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2755,7 +2758,10 @@ class HTTPClientTests: XCTestCase {
|
||||
if isTestingNIOTS() {
|
||||
XCTAssertEqual(error as? ChannelError, .connectTimeout(.milliseconds(200)))
|
||||
} else {
|
||||
XCTAssertEqual(error as? NIOSSLError, NIOSSLError.uncleanShutdown)
|
||||
switch error as? NIOSSLError {
|
||||
case .some(.handshakeFailed(.sslError(_))): break
|
||||
default: XCTFail("Handshake failed with unexpected error: \(String(describing: error))")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user