Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Make metric validation more consistent #2840

Merged
merged 3 commits into from
Oct 21, 2024

Conversation

chynesNR
Copy link
Member

@chynesNR chynesNR commented Oct 21, 2024

A common source of intermittent integration test failures are cases where we're looking for multiple occurrences of a metric, since there's always a small chance that they fall over more than one harvest cycle. I used a regex to find all of the cases where we're looking for multiple instances, and changed them to check all harvests.

This touched a lot of files but only contains two changes:

  1. Replacing callCount with CallCountAllHarvests where appropriate
  2. Fixed a bug in TryFindMetrics() (which broke on regex scope assertions that encountered a null scope)

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.31%. Comparing base (a77919e) to head (ed8f8dd).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2840   +/-   ##
=======================================
  Coverage   81.31%   81.31%           
=======================================
  Files         460      460           
  Lines       29239    29239           
  Branches     3231     3231           
=======================================
  Hits        23777    23777           
  Misses       4669     4669           
  Partials      793      793           
Flag Coverage Δ
Agent 82.22% <ø> (ø)
Profiler 73.33% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@chynesNR chynesNR marked this pull request as ready for review October 21, 2024 20:49
@chynesNR chynesNR requested a review from a team as a code owner October 21, 2024 20:49
@chynesNR chynesNR merged commit ba9ee7b into main Oct 21, 2024
94 checks passed
@chynesNR chynesNR deleted the test/integration-test-metric-stability branch October 21, 2024 22:44
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