Skip to content

Commit

Permalink
Fix Ubuntu queue priority not set
Browse files Browse the repository at this point in the history
  • Loading branch information
FabrizioBrancati committed Apr 3, 2024
1 parent 3923794 commit 1197cec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Tests/QueuerTests/QueuerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import Dispatch
import XCTest

internal class QueuerTests: XCTestCase {
#if !os(Linux)
internal func testOperationCount() {
let queue = Queuer(name: "QueuerTestOperationCount")
let testExpectation = expectation(description: "Operation Count")
Expand All @@ -40,6 +39,7 @@ internal class QueuerTests: XCTestCase {
Thread.sleep(forTimeInterval: 2)
testExpectation.fulfill()
}
concurrentOperation.queuePriority = .normal
concurrentOperation.addToQueue(queue)
XCTAssertEqual(queue.operationCount, 1)

Expand All @@ -48,7 +48,6 @@ internal class QueuerTests: XCTestCase {
XCTAssertEqual(queue.operationCount, 0)
}
}
#endif

internal func testOperations() {
let queue = Queuer(name: "QueuerTestOperations")
Expand All @@ -58,6 +57,8 @@ internal class QueuerTests: XCTestCase {
Thread.sleep(forTimeInterval: 2)
testExpectation.fulfill()
}
concurrentOperation.queuePriority = .normal

queue.addOperation(concurrentOperation)
XCTAssertTrue(queue.operations.contains(concurrentOperation))

Expand Down

0 comments on commit 1197cec

Please sign in to comment.