File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Tests/AsyncHTTPClientTests Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 19
19
--disable redundantReturn
20
20
--disable preferKeyPath
21
21
--disable sortedSwitchCases
22
+ --disable numberFormatting
22
23
23
24
# rules
Original file line number Diff line number Diff line change @@ -1216,9 +1216,9 @@ class HTTPClientTests: XCTestCase {
1216
1216
method: . GET,
1217
1217
headers: [ " X-internal-delay " : " 2000 " ] ,
1218
1218
body: nil )
1219
- let start = Date ( )
1220
- let response = try ! self . defaultClient. execute ( request: req) . wait ( )
1221
- XCTAssertGreaterThan ( Date ( ) . timeIntervalSince ( start ) , 2 )
1219
+ let start = NIODeadline . now ( )
1220
+ let response = try self . defaultClient. execute ( request: req) . wait ( )
1221
+ XCTAssertGreaterThanOrEqual ( . now ( ) - start , . milliseconds ( 1_900 /* 1.9 seconds */ ) )
1222
1222
XCTAssertEqual ( response. status, . ok)
1223
1223
}
1224
1224
You can’t perform that action at this time.
0 commit comments