Skip to content

Commit 22de662

Browse files
committed
Unnecessary creation of expectation removed in test_sessionDelegateAfterInvalidateAndCancel unit test from TestURLSession file.
1 parent d06f370 commit 22de662

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
@@ -810,15 +810,11 @@ class TestURLSession : LoopbackServerTest {
810810
}
811811

812812
func test_sessionDelegateAfterInvalidateAndCancel() {
813-
let expect = expectation(description: "Check nillify 'sessionDelegate' after invalidateAndCancel")
814-
815813
let delegate = SessionDelegate()
816814
let session = URLSession(configuration: .default, delegate: delegate, delegateQueue: nil)
817815
session.invalidateAndCancel()
818816
sleep(2)
819817
XCTAssertNil(session.delegate)
820-
expect.fulfill()
821-
waitForExpectations(timeout: 5)
822818
}
823819
}
824820

0 commit comments

Comments
 (0)