File tree 1 file changed +8
-3
lines changed
Tests/AsyncHTTPClientTests
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -2761,9 +2761,14 @@ class HTTPClientTests: XCTestCase {
2761
2761
XCTAssertNoThrow ( try server. close ( ) . wait ( ) )
2762
2762
}
2763
2763
2764
- // We set the connect timeout down very low here because on NIOTS this manifests as a connect
2765
- // timeout.
2766
- let config = HTTPClient . Configuration ( timeout: HTTPClient . Configuration. Timeout ( connect: . milliseconds( 200 ) , read: nil ) )
2764
+ var timeout = HTTPClient . Configuration. Timeout ( connect: . seconds( 10 ) )
2765
+ if isTestingNIOTS ( ) {
2766
+ // If we are using Network.framework, we set the connect timeout down very low here
2767
+ // because on NIOTS a failing TLS handshake manifests as a connect timeout.
2768
+ timeout. connect = . milliseconds( 300 )
2769
+ }
2770
+
2771
+ let config = HTTPClient . Configuration ( timeout: timeout)
2767
2772
let client = HTTPClient ( eventLoopGroupProvider: . shared( self . clientGroup) , configuration: config)
2768
2773
defer {
2769
2774
XCTAssertNoThrow ( try client. syncShutdown ( ) )
You can’t perform that action at this time.
0 commit comments