Skip to content

Commit

Permalink
Trying to fix Linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
FabrizioBrancati committed Nov 5, 2019
1 parent 35ccb66 commit 7e004cc
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions Tests/QueuerTests/ConcurrentOperationTests.swift
Expand Up @@ -161,9 +161,9 @@ internal class ConcurrentOperationTests: XCTestCase {
let testExpectation = expectation(description: "Chained Manual Retry")
var order: [Int] = []

let concurrentOperation1 = ConcurrentOperation { operation in
order.append(0)
let concurrentOperation1 = ConcurrentOperation(name: "concurrentOperation1") { operation in
operation.success = false
order.append(0)
}
concurrentOperation1.manualRetry = true

Expand All @@ -177,13 +177,16 @@ internal class ConcurrentOperationTests: XCTestCase {
concurrentOperation1.retry()
}

let concurrentOperation2 = ConcurrentOperation { operation in
order.append(1)
let concurrentOperation2 = ConcurrentOperation(name: "concurrentOperation2") { operation in
operation.success = false
order.append(1)
}
queue.addChainedOperations([concurrentOperation1, concurrentOperation2]) {
order.append(2)
testExpectation.fulfill()

DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(1)) {
queue.addChainedOperations([concurrentOperation1, concurrentOperation2]) {
order.append(2)
testExpectation.fulfill()
}
}

waitForExpectations(timeout: 10) { error in
Expand Down

0 comments on commit 7e004cc

Please sign in to comment.