-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Description
Our tests, especially the ones for executors, are somewhat flaky and incomplete. Because we rely on real timers, we can't test them as well as we should... 😞
The solution is to somehow mock time. For example, instead of using functions from the time
package directly, we can instead rely on an interface. For real-world code, that interface will be implemented by the same time
package, so nothing would change, but for test we'd be able to manually control the time "flow"...
This was previously mentioned in #1357 (comment) and #1386 (comment), but it probably deserves its own issue, so I created this.
Specific issues that this will likely make easier: #1715, #1719, #1974