Skip to content

Fix data race in metrics test#1394

Merged
danmux merged 1 commit intomainfrom
dm/fix-metrics-race
Mar 9, 2026
Merged

Fix data race in metrics test#1394
danmux merged 1 commit intomainfrom
dm/fix-metrics-race

Conversation

@danmux
Copy link
Contributor

@danmux danmux commented Mar 8, 2026

Summary

  • Reorder test setup so httpclient.New (which calls Wrap) completes before sys.Run starts polling Gauges()
  • Matches the real-world lifecycle and eliminates the race without adding locks to production code

🤖 Generated with Claude Code

@danmux danmux requested a review from a team as a code owner March 8, 2026 20:20
Reorder test setup so httpclient.New (which calls Wrap)
completes before sys.Run starts polling Gauges. This
matches the real-world lifecycle and eliminates the race
without adding locks to production code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@danmux danmux force-pushed the dm/fix-metrics-race branch from 79c26e0 to 80c64d4 Compare March 8, 2026 21:52
@danmux danmux changed the title Fix data race in metrics Wrap/Gauges Fix data race in metrics test Mar 8, 2026
@danmux danmux merged commit 9360d69 into main Mar 9, 2026
8 checks passed
@danmux danmux deleted the dm/fix-metrics-race branch March 9, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants