Reliably testing code that adopts Swift Concurrency?

I don't think that's necessarily true. If you substitute "Tasks" for "threads", and made a similar statement: "if we don't have control of the hardware to reliably progress CPU instructions in a certain way, we are always going to have flaky tests", then that hopefully rings false at first blush. It is possible to build testable concurrent systems out of hardware threads using synchronization, without changing the scheduling environment, and it ought to ultimately be possible with Swift concurrency as well, with the right tools.

4 Likes