Improve tests for Metrics Service #650
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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 🚀 New features to boost your workflow:
|
|
/gemini review |
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
LGTM, just a nit (by gemini).
| // Assert.False(string.IsNullOrWhiteSpace(desc)); | ||
| // Assert.NotEqual(version.Trim(), desc.Trim()); | ||
| } | ||
|
|
kornelione
left a comment
There was a problem hiding this comment.
- may also improve further with a retry-exhaustion test (currently tests 1 retry)
|
🦄 |
This PR adds tests for MetricsService and improves coverage for the uncovered GetRetryPolicy function.