Skip to content

Commit cdc0758

Browse files
committed
Adjust async test timeouts to 1 second.
1 parent 5a486dd commit cdc0758

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

TestFoundation/TestNSURLSession.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ extension TestNSURLSession {
207207

208208
delegate.completionExpectation = expectationWithDescription("Task did complete")
209209
task.resume()
210-
waitForExpectationsWithTimeout(0.1, handler: nil)
210+
waitForExpectationsWithTimeout(1, handler: nil)
211211
XCTAssertEqual(task.state, NSURLSessionTaskState.Completed)
212212

213213
guard let error = delegate.completionError else { XCTFail("URL: '\(urlString)'"); return }
@@ -243,7 +243,7 @@ extension TestNSURLSession {
243243

244244
delegate.completionExpectation = expectationWithDescription("Task did complete")
245245
task.resume()
246-
waitForExpectationsWithTimeout(1000, handler: nil)
246+
waitForExpectationsWithTimeout(1, handler: nil)
247247
XCTAssertEqual(task.state, NSURLSessionTaskState.Completed)
248248

249249
guard let error = delegate.completionError else { XCTFail(); return }
@@ -284,7 +284,7 @@ extension TestNSURLSession {
284284
XCTAssertEqual(task.state, NSURLSessionTaskState.Suspended)
285285
task.resume()
286286

287-
waitForExpectationsWithTimeout(1.0, handler: nil)
287+
waitForExpectationsWithTimeout(1, handler: nil)
288288
XCTAssertEqual(task.state, NSURLSessionTaskState.Running)
289289

290290
do {
@@ -305,7 +305,7 @@ extension TestNSURLSession {
305305
delegate.completionExpectation = expectationWithDescription("Task did complete")
306306
r.completionHandler(r.newRequest)
307307
}
308-
waitForExpectationsWithTimeout(0.1, handler: nil)
308+
waitForExpectationsWithTimeout(1, handler: nil)
309309
XCTAssertEqual(task.state, NSURLSessionTaskState.Completed)
310310

311311
do {
@@ -368,7 +368,7 @@ extension TestNSURLSession {
368368
XCTAssertEqual(task.state, NSURLSessionTaskState.Suspended)
369369
task.resume()
370370
XCTAssertEqual(task.state, NSURLSessionTaskState.Running)
371-
waitForExpectationsWithTimeout(0.1, handler: nil)
371+
waitForExpectationsWithTimeout(1, handler: nil)
372372
XCTAssertEqual(task.state, NSURLSessionTaskState.Completed)
373373
}
374374
}
@@ -415,7 +415,7 @@ extension TestNSURLSession {
415415

416416
delegate.completionExpectation = expectationWithDescription("Task did complete")
417417
task.resume()
418-
waitForExpectationsWithTimeout(0.1, handler: nil)
418+
waitForExpectationsWithTimeout(1, handler: nil)
419419

420420
do {
421421
XCTAssertEqual(delegate.allResponses.count, 1)
@@ -490,7 +490,7 @@ extension TestNSURLSession {
490490

491491
delegate.completionExpectation = expectationWithDescription("Task did complete")
492492
task.resume()
493-
waitForExpectationsWithTimeout(1000, handler: nil)
493+
waitForExpectationsWithTimeout(1, handler: nil)
494494

495495
do {
496496
XCTAssertEqual(delegate.allResponses.count, 1)
@@ -530,7 +530,7 @@ extension TestNSURLSession {
530530

531531
delegate.completionExpectation = expectationWithDescription("Task did complete")
532532
task.resume()
533-
waitForExpectationsWithTimeout(1000, handler: nil)
533+
waitForExpectationsWithTimeout(1, handler: nil)
534534

535535
do {
536536
XCTAssertEqual(delegate.allResponses.count, 0)

0 commit comments

Comments
 (0)