Open stephencelis opened 2 years ago
The first step of this is done; extracting the support into it's own package. I think the next step is to isolate more general purpose items and codify those into a maintainable general purpose testing infrastructure.
Any updates for more stable unit test?
Bumping this
A couple of weeks ago I brought up on the forums that it's basically impossible to write reliable tests for concurrent code: https://forums.swift.org/t/reliably-testing-code-that-adopts-swift-concurrency/57304
This repo has a bunch of internal code that aids in testing isolated async code, e.g. its sequences, in predictable, reproducible, and fast ways. This includes custom clocks, executors, and more.
Tools like these would ideally be more widely available to users that want to test async code, and should be extracted from this repo. They still won't make it possible to test async code that is threaded between actors, but hopefully this issue is also on Apple's radar, and a solution is in the works.