xUnit's default parallel execution let diagnostic-harness tests (CellarUp, DoorBug, DoorCollisionApparatus) mutate PhysicsResolveCapture.CapturePath and PhysicsDiagnostics probe flags concurrently with victim tests (MotionInterpreter, PositionManager, PlayerMovementController, DispatcherToMovement, BSPStepUp), producing a flaky 14-26 failure range. Fixes: - Add PhysicsResolveCapture.ResetForTest() + PhysicsDiagnostics.ResetForTest() as documented test-only reset APIs (never called from production paths). - Add IDisposable to CellarUpTrajectoryReplayTests with ctor/Dispose calling both ResetForTest() — prevents CapturePath from leaking between the Capture_* tests in the same class (the immediate root cause of Capture_SkipsNonPlayerCalls finding an unexpected file). - Add xunit.runner.json (maxParallelThreads=1, parallelizeTestCollections=false) to AcDream.Core.Tests — eliminates parallelism-induced probe-flag leaks across all test classes without requiring [Collection] boilerplate on every offender. After: two consecutive runs produce the identical 12-failure set. Confirmed: LiveCompare_FirstCap_FixClosesCottageFloorCap passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
44 lines
No EOL
1.7 KiB
XML
44 lines
No EOL
1.7 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<PropertyGroup>
|
|
<TargetFramework>net10.0</TargetFramework>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
<Nullable>enable</Nullable>
|
|
<IsPackable>false</IsPackable>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="coverlet.collector" Version="6.0.4" />
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
|
|
<PackageReference Include="xunit" Version="2.9.3" />
|
|
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<Using Include="Xunit" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<!-- T0: force serial test execution to prevent PhysicsResolveCapture /
|
|
PhysicsDiagnostics static state from leaking between test classes.
|
|
These statics are mutated by diagnostic-harness tests; xUnit's
|
|
default parallel execution races them against victim tests like
|
|
MotionInterpreterTests and PlayerMovementControllerTests. -->
|
|
<None Update="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\..\src\AcDream.Core\AcDream.Core.csproj" />
|
|
<ProjectReference Include="..\..\src\AcDream.App\AcDream.App.csproj" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<!-- Build ordering only — do NOT reference at runtime. The tests locate the
|
|
fixture DLL by path and load it into a separate ALC. -->
|
|
<ProjectReference Include="..\AcDream.Core.Tests.Fixtures.HelloPlugin\AcDream.Core.Tests.Fixtures.HelloPlugin.csproj">
|
|
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
|
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
|
|
</ProjectReference>
|
|
</ItemGroup>
|
|
|
|
</Project> |