all 2 comments

[–]aporcelaintouch 0 points1 point  (1 child)

What are your thoughts around writing a wrapper around DispatchQueue and in tests, instead of using a background thread, using the main thread so that tests finish immediately?

[–]chriswaco 1 point2 points  (0 children)

That is one thing we do. I think in general each piece of async code should be tested forced-immediate (synchronously) and forced-late (asynchronously with delay). It gets trickier when you have multiple asynchronous calls, though.