merge(agent-c): rows 91/95/96 — compile-cache tests on key-scoped delta assertions; Watch/Stop/ExpectTerminated at all 23 fast-tick actor creation sites in the three remaining AuditLog.Tests classes; per-suite xunit maxParallelThreads:4 for the four MSSQL-fixture suites (matches the row-82 semaphore slots) + Test Parallelism Policy doc

This commit is contained in:
Joseph Doherty
2026-08-17 05:28:51 -04:00
15 changed files with 428 additions and 54 deletions
@@ -248,15 +248,20 @@ public class DeploymentWarmThenGateTests : TestKit, IDisposable
"BatchTwo", ConfigJson("BatchTwo", sharedCode), "d2", "h2", true);
SiteScriptCompileCache.Clear();
Assert.Equal(0, SiteScriptCompileCache.Hits);
// Baseline rather than Assert.Equal(0, Hits): Hits is a process-global counter and test
// classes outside this collection compile scripts in parallel, so a foreign hit can land
// between the Clear() and the read (deferred-work register row 91). Everything below is
// asserted as a delta over this baseline.
var hitsBefore = SiteScriptCompileCache.Hits;
CreateDeploymentManager();
AwaitAssert(() =>
{
// One compile, then repeated hits: the second pre-warm plus both PreStarts.
Assert.True(SiteScriptCompileCache.Hits >= 3,
$"expected the pre-warmed body to be served from cache, saw {SiteScriptCompileCache.Hits} hits");
Assert.True(SiteScriptCompileCache.Hits - hitsBefore >= 3,
$"expected the pre-warmed body to be served from cache, saw " +
$"{SiteScriptCompileCache.Hits - hitsBefore} hits over baseline {hitsBefore}");
}, TimeSpan.FromSeconds(20));
}
}