ScriptedAlarmEngineRunGuardTests runaway-predicate test intermittent under full-suite load (InFlightCount 2, expected 1) #911

Closed
opened 2026-11-13 08:58:02 -05:00 by dohertj2 · 1 comment
Owner

Found in the #615 G2 full-suite re-run (2026-11-13, master f416b883).

Core.ScriptedAlarms.Tests.ScriptedAlarmEngineRunGuardTests.Runaway_predicate_leaks_one_orphan_is_refused_annotated_Bad_once_and_a_sibling_keeps_evaluating failed once:

  • Assertion: eng.RunGuard.InFlightCount should be 1 but was 2.
  • It did not fail in the first full run (16ddddb2).
  • The class then passed 5/5 when run alone.

It looks timing-sensitive under full-suite CPU load. A second in-flight evaluation was still counted when the assertion ran, perhaps the sibling's run or the orphan not yet registered as leaked. Check whether the test waits on a condition or on a fixed delay, and assert with an AwaitAssert-style deadline on the count (presence-vs-absence rule from #500).

Found in the #615 G2 full-suite re-run (2026-11-13, master `f416b883`). `Core.ScriptedAlarms.Tests.ScriptedAlarmEngineRunGuardTests.Runaway_predicate_leaks_one_orphan_is_refused_annotated_Bad_once_and_a_sibling_keeps_evaluating` failed once: - Assertion: `eng.RunGuard.InFlightCount should be 1 but was 2`. - It did not fail in the first full run (`16ddddb2`). - The class then passed 5/5 when run alone. It looks timing-sensitive under full-suite CPU load. A second in-flight evaluation was still counted when the assertion ran, perhaps the sibling's run or the orphan not yet registered as leaked. Check whether the test waits on a condition or on a fixed delay, and assert with an `AwaitAssert`-style deadline on the count (presence-vs-absence rule from #500).
dohertj2 added the type:testpriority:p3 labels 2026-11-13 08:58:02 -05:00
Author
Owner

Fixed in f1da809f (merged 79371402). Test race, not an engine defect: it waited for StartedRunCount>=6, which doesn't imply the healthy alarm's 6th run had finished, so InFlightCount could read 2. Now polls until StartedRunCount==6 && InFlightCount==1, widens the window deterministically, and adds positive controls for both absence assertions. Before: 2/60 failures under CPU saturation; after: 0/60, plus 0/60 with the suite looping concurrently.

Fixed in f1da809f (merged 79371402). Test race, not an engine defect: it waited for StartedRunCount>=6, which doesn't imply the healthy alarm's 6th run had finished, so InFlightCount could read 2. Now polls until StartedRunCount==6 && InFlightCount==1, widens the window deterministically, and adds positive controls for both absence assertions. Before: 2/60 failures under CPU saturation; after: 0/60, plus 0/60 with the suite looping concurrently.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#911