Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #650 +/- ##
==========================================
+ Coverage 77.71% 77.91% +0.20%
==========================================
Files 136 136
Lines 13226 13226
Branches 1991 1991
==========================================
+ Hits 10278 10305 +27
+ Misses 2112 2083 -29
- Partials 836 838 +2 🚀 New features to boost your workflow:
|
Contributor
|
/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
previously approved these changes
Apr 1, 2026
ozangoktan
reviewed
Apr 1, 2026
Comment on lines
+321
to
+336
| #nullable enable | ||
| private sealed class FakeLogger<T> : ILogger<T> | ||
| { | ||
| public List<(LogLevel Level, string Message)> Entries { get; } = new List<(LogLevel Level, string Message)>(); | ||
|
|
||
| IDisposable ILogger.BeginScope<TState>(TState state) => NullScope.Instance; | ||
| bool ILogger.IsEnabled(LogLevel logLevel) => true; | ||
| void ILogger.Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter) | ||
| => Entries.Add((logLevel, formatter(state, exception))); | ||
|
|
||
| private sealed class NullScope : IDisposable | ||
| { | ||
| public static readonly NullScope Instance = new NullScope(); | ||
| public void Dispose() { } | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
Something like this belongs in ExtractorUtils.Test project, if we don't already have one.
Hmnt39
approved these changes
Apr 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds tests for MetricsService and improves coverage for the uncovered GetRetryPolicy function.