Merge pull request #1631 from kielgillard/feedly-fix-tests-post-operations-surgery

Fix test failures by cancelling operations with the queue.
This commit is contained in:
Maurice Parker 2020-01-16 13:45:36 -08:00 committed by GitHub
commit fb8d77fff1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 7 deletions

View File

@ -55,7 +55,7 @@ class FeedlyCheckpointOperationTests: XCTestCase {
MainThreadOperationQueue.shared.addOperation(operation)
operation.cancel()
MainThreadOperationQueue.shared.cancelOperations([operation])
waitForExpectations(timeout: 1)
}

View File

@ -75,7 +75,7 @@ class FeedlyLogoutOperationTests: XCTestCase {
MainThreadOperationQueue.shared.addOperation(logout)
logout.cancel()
MainThreadOperationQueue.shared.cancelOperations([logout])
waitForExpectations(timeout: 1)

View File

@ -117,7 +117,7 @@ class FeedlyOperationTests: XCTestCase {
MainThreadOperationQueue.shared.addOperation(testOperation)
testOperation.cancel()
MainThreadOperationQueue.shared.cancelOperations([testOperation])
waitForExpectations(timeout: 2)
@ -180,8 +180,8 @@ class FeedlyOperationTests: XCTestCase {
MainThreadOperationQueue.shared.addOperation(testOperation)
XCTAssertTrue(progress.numberRemaining == 1)
testOperation.cancel()
XCTAssertTrue(progress.numberRemaining == 1)
MainThreadOperationQueue.shared.cancelOperations([testOperation])
XCTAssertTrue(progress.numberRemaining == 0)
waitForExpectations(timeout: 2)

View File

@ -63,7 +63,7 @@ class FeedlyRefreshAccessTokenOperationTests: XCTestCase {
MainThreadOperationQueue.shared.addOperation(refresh)
refresh.cancel()
MainThreadOperationQueue.shared.cancelOperations([refresh])
waitForExpectations(timeout: 1)

View File

@ -127,7 +127,7 @@ class FeedlyUpdateAccountFeedsWithItemsOperationTests: XCTestCase {
MainThreadOperationQueue.shared.addOperation(update)
update.cancel()
MainThreadOperationQueue.shared.cancelOperations([update])
waitForExpectations(timeout: 2)