Async Operations + Unit Testing

I have two block operations like so

let operation1 = BlockOperation {
 // This operation adds bunch of other operations to the queue to be executed in linked chunks of code
}

let operation2 = BlockOperation {
 XCTAssertNotNil(XXXX)
}

operation2.addDependency(operation1)

problem is operation2 gets called before the chain of operations as part of operation1 gets done; how do I prevent this and execute operation2 only after the chain is executed?

as far as I remember, they were being executed on different threads running in parallel; will revisit if any one is interested, can be considered void

1 Like

@lganti Do you still have issues with this?

1 Like

No, can be closed :slight_smile: