Fix tests (#356)

This commit is contained in:
David Evans
2021-04-27 15:43:07 +01:00
committed by GitHub
parent e4fded76ac
commit f3521033ef
2 changed files with 9 additions and 3 deletions
@@ -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))")
}
}
}
}