Skip to content

Commit c9d1eda

Browse files
committed
Unnecessary creation of expectation removed in test_sessionDelegateAfterInvalidateAndCancel unit test from TestURLSession file.
1 parent 71c1c77 commit c9d1eda

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

TestFoundation/TestURLSession.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -825,15 +825,11 @@ class TestURLSession : LoopbackServerTest {
825825
}
826826

827827
func test_sessionDelegateAfterInvalidateAndCancel() {
828-
let expect = expectation(description: "Check nillify 'sessionDelegate' after invalidateAndCancel")
829-
830828
let delegate = SessionDelegate()
831829
let session = URLSession(configuration: .default, delegate: delegate, delegateQueue: nil)
832830
session.invalidateAndCancel()
833831
sleep(2)
834832
XCTAssertNil(session.delegate)
835-
expect.fulfill()
836-
waitForExpectations(timeout: 5)
837833
}
838834

839835
}

0 commit comments

Comments
 (0)