Skip to content

*: fix flaky monitoringapi test#4509

Merged
KaloyanTanev merged 1 commit intomainfrom
kalo/fix-flaky-monitoringapi-test
May 1, 2026
Merged

*: fix flaky monitoringapi test#4509
KaloyanTanev merged 1 commit intomainfrom
kalo/fix-flaky-monitoringapi-test

Conversation

@KaloyanTanev
Copy link
Copy Markdown
Collaborator

  • Fix flaky monitoringapi test
  • Fix linter

category: test
ticket: none

@KaloyanTanev KaloyanTanev requested review from Copilot and pinebit May 1, 2026 14:13
@KaloyanTanev KaloyanTanev self-assigned this May 1, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 1, 2026

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.Eventually to wait for expected gauge labels to be set (not just mock call counters).
  • Adjust whitespace in p2p/sender.go to satisfy the linter around defer blocks.

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.

@KaloyanTanev KaloyanTanev enabled auto-merge (squash) May 1, 2026 14:17
@KaloyanTanev KaloyanTanev merged commit bc022e2 into main May 1, 2026
13 of 14 checks passed
@KaloyanTanev KaloyanTanev deleted the kalo/fix-flaky-monitoringapi-test branch May 1, 2026 14:20
@codecov
Copy link
Copy Markdown

codecov Bot commented May 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.17%. Comparing base (b35fc00) to head (6ef6d30).
⚠️ Report is 2 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

3 participants