- Notifications
You must be signed in to change notification settings - Fork1.1k
chore: refactor apphealth and tests to use clock testing library#13576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
spikecurtis commentedJun 14, 2024
This stack of pull requests is managed by Graphite.Learn more about stacking. Join@spikecurtis and the rest of your teammates on |
| fori:=0;i<2;i++ { | ||
| c:=healthcheckTrap.MustWait(ctx) | ||
| c.Release() | ||
| healthchecksStarted[i]=c.Tags[1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
nicely illustrates a use case for multiple tags
johnstcn left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Nice!

Uh oh!
There was an error while loading.Please reload this page.
Refactors the apphealth subsystem and unit tests to use
clock.Clock.Also slightly simplifies the implementation, which wrapped a function that never returned an error in a
retry.Retry. The retry is entirely superfluous in that case, so removed.UTs used to take a few seconds to run, and now run in milliseconds or better. No sleeps,
Eventually, or polling.Dropped the "no spamming" test since we can directly assert the number of handler calls on the mainline test case.