- Notifications
You must be signed in to change notification settings - Fork1k
Commit42324b3
authored
chore: add clock pkg for testing time (#13461)
Adds a package for testing time/timer/ticker functions. Implementation is limited to `NewTimer` and `NewContextTicker`, but will eventually be expanded to all `time` functions from the standard library as well as `context.WithTimeout()`, `context.WithDeadline()`.Replaces `benbjohnson/clock` for the pubsub watchdog, as a proof of concept.Eventually, as we expand functionality, we will replace most time-related functions with this library for testing.1 parenta4bba52 commit42324b3
File tree
6 files changed
+658
-45
lines changed- clock
- coderd/database/pubsub
6 files changed
+658
-45
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + |
0 commit comments
Comments
(0)