Skip to content

Improve tests for Metrics Service #650

Merged
devendra-lohar merged 5 commits intomasterfrom
improve_metrics_tests
Apr 8, 2026
Merged

Improve tests for Metrics Service #650
devendra-lohar merged 5 commits intomasterfrom
improve_metrics_tests

Conversation

@devendra-lohar
Copy link
Copy Markdown
Contributor

This PR adds tests for MetricsService and improves coverage for the uncovered GetRetryPolicy function.

@devendra-lohar devendra-lohar requested a review from a team as a code owner March 30, 2026 06:46
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.14%. Comparing base (fc5b066) to head (77de020).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #650      +/-   ##
==========================================
+ Coverage   77.75%   78.14%   +0.39%     
==========================================
  Files         136      136              
  Lines       13228    13228              
  Branches     1991     1991              
==========================================
+ Hits        10285    10337      +52     
+ Misses       2108     2052      -56     
- Partials      835      839       +4     

see 5 files with indirect coverage changes

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

@ozangoktan
Copy link
Copy Markdown
Contributor

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces unit tests to verify the retry policy of the metrics server, specifically for transient HTTP errors and exceptions. It also implements a FakeLogger to facilitate log assertion in tests. The review feedback identifies a signature mismatch in the ILogger.Log implementation within FakeLogger, recommending the use of nullable Exception? to ensure compatibility with Nullable Reference Types.

Hmnt39
Hmnt39 previously approved these changes Apr 1, 2026
Copy link
Copy Markdown
Contributor

@Hmnt39 Hmnt39 left a comment

Choose a reason for hiding this comment

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

LGTM, just a nit (by gemini).

Hmnt39
Hmnt39 previously approved these changes Apr 1, 2026
@devendra-lohar devendra-lohar added the waiting-for-risk-review Waiting for a member of the risk review team to take an action label Apr 6, 2026
@kornelione kornelione self-assigned this Apr 7, 2026
@kornelione kornelione added risk-review-ongoing Risk review is in progress and removed waiting-for-risk-review Waiting for a member of the risk review team to take an action labels Apr 7, 2026
// Assert.False(string.IsNullOrWhiteSpace(desc));
// Assert.NotEqual(version.Trim(), desc.Trim());
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nit: unexpected blank line

Copy link
Copy Markdown

@kornelione kornelione left a comment

Choose a reason for hiding this comment

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

  • may also improve further with a retry-exhaustion test (currently tests 1 retry)

@kornelione
Copy link
Copy Markdown

🦄

@kornelione kornelione added the waiting-for-team Waiting for the submitter or reviewer of the PR to take an action label Apr 7, 2026
@devendra-lohar devendra-lohar merged commit 53172dc into master Apr 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk-review-ongoing Risk review is in progress waiting-for-team Waiting for the submitter or reviewer of the PR to take an action

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants