Step 8 (final) of multi-instancing migration. All per-battle statics now require a BattleAmbient scope — unwrapped writes throw InvalidOperationException (fail-fast forcing function). MultiInstanceEngineTests proves correctness: two parallel battles resolve independently, N=4/8/16 stress matches sequential baseline, GameMgr.GetIns throws without scope. Migration complete. EngineSessionGate gone. Suite fully green. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
20 lines
1.1 KiB
C#
20 lines
1.1 KiB
C#
namespace SVSim.BattleEngine.Tests
|
|
{
|
|
// Shared base for every network-emit test fixture (M13 EmitPathReadOracleTests, the
|
|
// construction-probe's OnEmit seam test, and any M14+ network fixture to come).
|
|
//
|
|
// POST-TASK-8 (multi-instancing migration): now empty. The historical hygiene gap this class
|
|
// closed (HeadlessEngineEnv.NewNetworkEmitBattle leaving IsForecast=false + a stray injected
|
|
// agent visible to a later solo fixture) was a PROCESS-GLOBAL leak via the now-deleted
|
|
// BattleManagerBase._isForecastFallback + ToolboxGame._realTimeNetworkAgentFallback statics.
|
|
// Both fields are gone: IsForecast/RealTimeNetworkAgent live on the per-test ambient context
|
|
// (TestBattleScope's BattleAmbientContext), so scope Dispose drops them. A later fixture's
|
|
// new TestBattleScope starts a fresh ctx with IsForecast=true and a null NetworkAgent by
|
|
// default — exactly the EnsureInitialized invariant the old TearDown manually restored.
|
|
//
|
|
// Kept as a marker base class so derived fixtures don't churn; can be deleted in Task 9.
|
|
public abstract class NetworkEmitFixtureBase
|
|
{
|
|
}
|
|
}
|