feat(tests): use FakeTimeProvider for deterministic CircuitBreaker tests#367
Merged
RicherTunes merged 9 commits intomainfrom Jan 13, 2026
Merged
feat(tests): use FakeTimeProvider for deterministic CircuitBreaker tests#367RicherTunes merged 9 commits intomainfrom
RicherTunes merged 9 commits intomainfrom
Conversation
Bump lidarr.plugin.common submodule (includes TimeProvider injection). Add testkit project reference to Brainarr.Tests. Update CircuitBreaker to accept optional TimeProvider parameter. Refactor state transition tests to use FakeTimeProvider.Advance() instead of flaky Task.Delay() calls. Benefits: CircuitBreaker_transitions_to_half_open_after_duration runs in 1ms (was 1500ms+). Eliminates timing-based test flakiness. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
TestKit.csproj uses NSubstitute, which must be allowed in NuGet.config package source mapping. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ectly Use workflow_call inputs from Common PR #269: test_plugins, lidarr_tag. Use secrets: inherit for cross-repo access. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Includes: - #268: fix(testkit): add AdditionalProperties to prevent CS2012 file locks - #270: fix(auth): make StreamingTokenManager deterministically testable with TimeProvider - #269: feat(ci): reusable multi-plugin smoke test + Brainarr schema assertions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
RicherTunes
added a commit
that referenced
this pull request
Feb 17, 2026
Picks up: - #383: fix(ci): Windows credential issue in change detection step - #367: deps: coverlet.collector 6.0.4 → 8.0.0 - #370: deps: publicapigenerator.tool 11.4.6 → 11.5.4 - #371: deps: Spectre.Console 0.50.0 → 0.54.0 - #375: deps: xunit 2.9.2 → 2.9.3 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2 tasks
RicherTunes
added a commit
that referenced
this pull request
Feb 17, 2026
Picks up: - #383: fix(ci): Windows credential issue in change detection step - #367: deps: coverlet.collector 6.0.4 → 8.0.0 - #370: deps: publicapigenerator.tool 11.4.6 → 11.5.4 - #371: deps: Spectre.Console 0.50.0 → 0.54.0 - #375: deps: xunit 2.9.2 → 2.9.3 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
RicherTunes
added a commit
that referenced
this pull request
Feb 17, 2026
Picks up: - #383: fix(ci): Windows credential issue in change detection step - #367: deps: coverlet.collector 6.0.4 → 8.0.0 - #370: deps: publicapigenerator.tool 11.4.6 → 11.5.4 - #371: deps: Spectre.Console 0.50.0 → 0.54.0 - #375: deps: xunit 2.9.2 → 2.9.3 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
Benefits
CircuitBreaker_transitions_to_half_open_after_duration: 1500ms -> 1msHalf_open_failure_reopens_circuit: saves 1100ms wait time on open durationTest plan
🤖 Generated with Claude Code