@@ -19,7 +19,6 @@ import NIOSOCKS
19
19
import XCTest
20
20
21
21
class HTTPConnectionPool_FactoryTests : XCTestCase {
22
-
23
22
func testConnectionCreationTimesoutIfDeadlineIsInThePast( ) {
24
23
let group = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
25
24
defer { XCTAssertNoThrow ( try group. syncShutdownGracefully ( ) ) }
@@ -48,13 +47,13 @@ class HTTPConnectionPool_FactoryTests: XCTestCase {
48
47
connectionID: 1 ,
49
48
deadline: . now( ) - . seconds( 1 ) ,
50
49
eventLoop: group. next ( ) ,
51
- logger: . init( label: " test " ) ) . wait ( )
50
+ logger: . init( label: " test " )
51
+ ) . wait ( )
52
52
) {
53
53
XCTAssertEqual ( $0 as? HTTPClientError , . connectTimeout)
54
54
}
55
55
}
56
56
57
-
58
57
func testSOCKSConnectionCreationTimesoutIfRemoteIsUnresponsive( ) {
59
58
let group = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
60
59
defer { XCTAssertNoThrow ( try group. syncShutdownGracefully ( ) ) }
@@ -83,7 +82,8 @@ class HTTPConnectionPool_FactoryTests: XCTestCase {
83
82
connectionID: 1 ,
84
83
deadline: . now( ) + . seconds( 1 ) ,
85
84
eventLoop: group. next ( ) ,
86
- logger: . init( label: " test " ) ) . wait ( )
85
+ logger: . init( label: " test " )
86
+ ) . wait ( )
87
87
) {
88
88
XCTAssertEqual ( $0 as? HTTPClientError , . socksHandshakeTimeout)
89
89
}
@@ -117,7 +117,8 @@ class HTTPConnectionPool_FactoryTests: XCTestCase {
117
117
connectionID: 1 ,
118
118
deadline: . now( ) + . seconds( 1 ) ,
119
119
eventLoop: group. next ( ) ,
120
- logger: . init( label: " test " ) ) . wait ( )
120
+ logger: . init( label: " test " )
121
+ ) . wait ( )
121
122
) {
122
123
XCTAssertEqual ( $0 as? HTTPClientError , . httpProxyHandshakeTimeout)
123
124
}
@@ -151,7 +152,8 @@ class HTTPConnectionPool_FactoryTests: XCTestCase {
151
152
connectionID: 1 ,
152
153
deadline: . now( ) + . seconds( 1 ) ,
153
154
eventLoop: group. next ( ) ,
154
- logger: . init( label: " test " ) ) . wait ( )
155
+ logger: . init( label: " test " )
156
+ ) . wait ( )
155
157
) {
156
158
XCTAssertEqual ( $0 as? HTTPClientError , . tlsHandshakeTimeout)
157
159
}
0 commit comments