*: fix flaky monitoringapi test#4509
Conversation
|
There was a problem hiding this comment.
Pull request overview
This PR stabilizes a flaky monitoringapi metric test by ensuring assertions wait for both mock call completion and Prometheus gauge population, and applies minor formatting changes to satisfy linting rules.
Changes:
- Fix test flakiness by updating
require.Eventuallyto wait for expected gauge labels to be set (not just mock call counters). - Adjust whitespace in
p2p/sender.goto satisfy the linter arounddeferblocks.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| p2p/sender.go | Adds separating blank lines before defer blocks to satisfy linting/formatting rules. |
| app/monitoringapi_internal_test.go | Updates the flaky test to wait until the execution engine version gauge is populated, eliminating a race with mock-call counters. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4509 +/- ##
==========================================
+ Coverage 57.11% 57.17% +0.06%
==========================================
Files 245 245
Lines 32920 32939 +19
==========================================
+ Hits 18801 18832 +31
+ Misses 11752 11743 -9
+ Partials 2367 2364 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|



category: test
ticket: none