fix(runtime): review findings — recursion-safe run cap, atomic detach counter, summary edge cases, per-row event-log fallback
This commit is contained in:
+8
-1
@@ -85,7 +85,12 @@ public class ScriptDeadlineAtEnqueueTests : TestKit, IDisposable
|
||||
var lateOptions = new SiteRuntimeOptions
|
||||
{
|
||||
ScriptExecutionTimeoutSeconds = 1,
|
||||
StuckScriptGraceMs = 1000
|
||||
StuckScriptGraceMs = 1000,
|
||||
// WP3.2 defaults per-run Started/Completed events OFF, which would make the
|
||||
// "no started event" assertion below vacuously true whether the body ran or not.
|
||||
// Opt back in so that assertion actually discriminates: a body that reached the
|
||||
// run loop WOULD emit "started" here, and its absence is therefore evidence.
|
||||
PerRunScriptEvents = true
|
||||
};
|
||||
var late = BuildScriptActor(
|
||||
"Late",
|
||||
@@ -112,6 +117,8 @@ public class ScriptDeadlineAtEnqueueTests : TestKit, IDisposable
|
||||
{
|
||||
var rows = siteLog.OfType("script");
|
||||
// Timeout path only — no "started" Info event, because the body was skipped.
|
||||
// Per-run events are ON for this script (see lateOptions), so this absence is a
|
||||
// real signal rather than the global default.
|
||||
Assert.Contains(rows, r => r.Severity == "Error" && r.Message.Contains("timed out"));
|
||||
Assert.DoesNotContain(rows, r => r.Message.Contains("started", StringComparison.OrdinalIgnoreCase));
|
||||
}, TimeSpan.FromSeconds(5));
|
||||
|
||||
Reference in New Issue
Block a user