Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
spikecurtis merged 1 commit intomainfromspike/clock-testing-apphealth
Jun 14, 2024

Conversation

@spikecurtis
Copy link
Contributor

@spikecurtisspikecurtis commentedJun 14, 2024
edited
Loading

Refactors the apphealth subsystem and unit tests to useclock.Clock.

Also slightly simplifies the implementation, which wrapped a function that never returned an error in aretry.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.

@spikecurtisGraphite App
Copy link
ContributorAuthor

This stack of pull requests is managed by Graphite.Learn more about stacking.

Join@spikecurtis and the rest of your teammates onGraphiteGraphite

@spikecurtisspikecurtis marked this pull request as ready for reviewJune 14, 2024 09:56
fori:=0;i<2;i++ {
c:=healthcheckTrap.MustWait(ctx)
c.Release()
healthchecksStarted[i]=c.Tags[1]
Copy link
ContributorAuthor

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

Copy link
Member

@johnstcnjohnstcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Nice!

@spikecurtisspikecurtis merged commitc01d6fd intomainJun 14, 2024
@spikecurtisspikecurtis deleted the spike/clock-testing-apphealth branchJune 14, 2024 11:06
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJun 14, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

@f0sself0sselAwaiting requested review from f0ssel

Assignees

@spikecurtisspikecurtis

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@spikecurtis@johnstcn

[8]ページ先頭

©2009-2025 Movatter.jp