Skip to content

Commit 0e8ba42

Browse files
author
x4snowman
committed
Update test case to only test dependency count
1 parent c0f0181 commit 0e8ba42

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

TestFoundation/TestOperationQueue.swift

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class TestOperationQueue : XCTestCase {
2525
("test_CurrentQueueWithCustomUnderlyingQueue", test_CurrentQueueWithCustomUnderlyingQueue),
2626
("test_CurrentQueueWithUnderlyingQueueResetToNil", test_CurrentQueueWithUnderlyingQueueResetToNil),
2727
("test_isSuspended", test_isSuspended),
28-
("test_OperationDependencies", test_OperationDependencies),
28+
("test_OperationDependencyCount", test_OperationDependencyCount),
2929
]
3030
}
3131

@@ -266,10 +266,8 @@ class TestOperationQueue : XCTestCase {
266266
waitForExpectations(timeout: 1)
267267
}
268268

269-
func test_OperationDependencies() {
270-
let queue = OperationQueue()
269+
func test_OperationDependencyCount() {
271270
var results = [Int]()
272-
queue.maxConcurrentOperationCount = 1
273271
let op1 = BlockOperation {
274272
results.append(1)
275273
}
@@ -280,10 +278,6 @@ class TestOperationQueue : XCTestCase {
280278
op2.name = "op2"
281279
op1.addDependency(op2)
282280
XCTAssert(op1.dependencies.count == 1)
283-
queue.addOperation(op1)
284-
queue.addOperation(op2)
285-
queue.waitUntilAllOperationsAreFinished()
286-
XCTAssertEqual(results, [2, 1])
287281
}
288282
}
289283

0 commit comments

Comments
 (0)