test: phase 5 — ascending-order coverage push#91
Closed
JerrettDavis wants to merge 9 commits into
Closed
Conversation
Add 42 unit tests covering PersistenceResult factory methods, ConcurrencyConflictException constructors, DI registration helpers (AddInMemoryGovernancePersistence, AddGovernancePersistence overloads), and extended InMemoryPersistenceBackplane operations (policy evaluations, approval records, configuration versions, environment scoping, conflict semantics). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add 63 unit tests across five files: - TenantResolverUnitTests: HTTP header, claims, subdomain, and composite resolvers - InMemoryRolloutPersistenceTests: save/get/update/delete, active filter, tenant scoping - DefaultThemeProviderTests: null/custom theme, tenant-agnostic, cancellation - ClaimsPrincipalAuthProviderTests: roles (dedup, custom claim), claims list, permissions - DashboardMiddlewareTests: bypass paths, auth redirect, tenant context lifecycle, authorization service success/failure Uses DefaultHttpContext and System.Security.Claims; no external dependencies. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add 7 unit tests for AddRedisGovernancePersistence DI extensions using Mock<IConnectionMultiplexer> to avoid a real Redis connection. Tests cover both overloads (existing multiplexer and connection-string factory), TryAdd deduplication, singleton lifetime, and return-value chaining. Add Moq 4.20.72 and Microsoft.Extensions.DependencyInjection 10.0.1 to the test project; refresh packages.lock.json accordingly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… 85% New test project ExperimentFramework.Configuration.Tests (net10.0) with 19 tests: - SchemaExporterTests (9): ExportUnifiedSchema/ExportExtensionSchema write valid formatted JSON, create directories, produce deserializable output; CreateSchemaFromAssembly filters to namespace and returns correct metadata. - BackplaneHandlerTests (10): BackplaneType strings, Validate() always returns empty, ConfigureServices throws InvalidOperationException when DataPlane assembly is not in scope (unit test isolation). Project registered in ExperimentFramework.slnx; packages.lock.json committed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add missing lock files for projects that lacked them (Dashboard.Tests, Dashboard.Api.Tests, Dashboard.UI.Tests, E2E.Tests, Simulation.Tests, Governance.Persistence.Redis src, Governance.Persistence.Sql src, Simulation src, SimulationSample), and refresh AspireDemo lock files that shifted due to transitive dependency graph changes. Required for CI --use-lock-file enforcement. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. OpenSSF Scorecard
Scanned Files
|
The Phase 5 PR added ServiceCollectionExtensionsTests.cs to
ExperimentFramework.Governance.Persistence.Redis.Tests — an assembly
that already contained RedisGovernancePersistenceBackplaneTests
(marked [Trait("Category","integration")]). This mixed-trait assembly
triggered a VSTest/xUnit filter edge case on Ubuntu CI: the
Category!=integration filter stopped properly excluding the
Testcontainers-based integration tests, causing Docker Redis container
startup to hang indefinitely. CI timed out after 54 minutes.
Root cause: When an xUnit assembly contains both trait-annotated
(Category=integration) and no-trait tests, the VSTest `!=` filter
on Ubuntu/Linux includes ALL tests including the Testcontainers ones,
which require Docker and can hang waiting for container startup.
Fix: remove ServiceCollectionExtensionsTests.cs, revert the Moq/MEDi
package additions, and delete the Windows-generated packages.lock.json
from the Redis tests project. The 7 DI service-collection tests will
be tracked for re-addition in a separate project or with proper CI
infrastructure in a follow-up.
Local validation: all other Phase 5 tests pass (79 Dashboard, 46
Governance.Persistence, 19 Configuration, 2094 core, etc.).
Tracking follow-up: move Redis ServiceCollection unit tests to a
standalone no-Testcontainers project so they run cleanly in CI.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The dotnet test step was re-building multi-target source projects (e.g. ExperimentFramework.Audit targets net8/9/10) immediately before launching the net10.0 test host, which caused the Audit.Tests host to hang indefinitely during coverlet data-collector initialisation. Adding --no-build skips the redundant rebuild (the Build (Release) step already produced all required binaries) and removes the timing window that triggered the hang. Also adds missing packages.lock.json for Governance.Persistence.Tests and Governance.Persistence.Redis.Tests so the NuGet cache key covers all test projects and the --use-lock-file restore does not regenerate lock files during the test step. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… hang When dotnet test runs the full solution with --collect:'XPlat Code Coverage', the test host process for ExperimentFramework.Tests (2094 tests, many project refs) crashes during AfterTestRunEnd coverage data collection. On Linux CI this manifests as a 55-minute silent hang (socket doesn't RST on crash), consuming the entire 60-minute job timeout. Fix: split the combined 'Test with coverage' step into two steps: 1. 'Test (verify correctness)' - full solution run, no coverage, no hang 2. 'Collect coverage (per-project)' - each project tested individually; isolated test hosts avoid the multi-session crash. The resulting coverage.cobertura.xml files are picked up by the existing reportgenerator step unchanged. Applied the same split to the release job's test step. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The three Distributed.Redis test classes start real Docker containers via
Testcontainers but had no [Trait("Category","integration")] marker, so
they ran in the standard CI filter and blocked the test host waiting for
Docker — causing the hang that appeared after Dashboard.UI.Tests.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Owner
Author
|
Closing — Phase 5 test additions cause repeated CI hangs/failures we couldn't resolve in budget. Coverage gains documented in commits 983368c (Governance.Persistence 5%→90%), 76d1ba0 (Dashboard 23%→65%), c04780c (Governance.Persistence.Redis 45%→80%), d5c549e (Configuration) for future cherry-pick. Main remains at ~87% coverage post-Phase-4. |
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
Coverage phase 5: attacked the four lowest-coverage src/ assemblies in ascending order, bringing each one up significantly.
Also adds a new test project (
ExperimentFramework.Configuration.Tests) and commits missingpackages.lock.jsonfiles required for CI--use-lock-fileenforcement.Test plan
🤖 Generated with Claude Code