Skip to content

Commit 72297d2

Browse files
Stress fixes: Cluster F poll, leak baseline timeout bump (#399)
Two independent stress-flake fixes per INVESTIGATION.md session 4 follow-up to PR #397: Cluster F (4/1000 hits in run 26351376710) — FloatingTitleBar_PaneBodyVisible asserted body TextBlock visibility after a single Harness.Render() following DockFloatingWindow.Open. Chrome (TabView, TitleBar absence, TabStripFooter) materializes on that first pump, but the inner pane content lags one or two pumps behind on a loaded CI runner. Same realization-race family as Cluster C; apply the same poll pattern (2s budget, 50ms between pumps) and annotate the check name with the observed body count for future-hit diagnostics. Cluster T-new (2/1000 hits) — EventSubscriptionLeakBaseline timing out at its 30s override. Local timing measurement across 3 fresh-process runs: 14.5 / 15.6 / 15.4 s (avg 15.2s) on a dev box. The fixture is 100 mount/unmount cycles x 2 Harness.Render() = 200 renders + 200 reconcile passes; the work itself is substantial. CI VMs under load have been measured at 2-4x slowdown elsewhere in the doc, easily overshooting the 30s budget. Not a hang — just budget vs CI variance. Bump FixtureTimeout to 60s (~4x local baseline) with a comment block explaining the math. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent aab59c3 commit 72297d2

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

tests/Reactor.AppTests.Host/SelfTest/Fixtures/NativeDockingReliabilityFixture.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,12 @@ public override async Task RunAsync()
523523
/// </summary>
524524
internal class EventSubscriptionLeakBaseline(Harness h) : SelfTestFixtureBase(h)
525525
{
526-
public override TimeSpan FixtureTimeout => TimeSpan.FromSeconds(30);
526+
// 100 mount/unmount cycles × 2 Harness.Render() each = 200 renders + 200
527+
// reconcile passes. Locally this runs ~15s; CI VMs under contention have
528+
// been measured at 2-4× slower per INVESTIGATION.md Cluster T, easily
529+
// overshooting the prior 30s budget on a heavy iteration. The cap exists
530+
// to catch a hung fixture, not to set a perf target.
531+
public override TimeSpan FixtureTimeout => TimeSpan.FromSeconds(60);
527532

528533
public override async Task RunAsync()
529534
{

tests/Reactor.AppTests.Host/SelfTest/Fixtures/NativeDockingSmokeFixture.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1652,9 +1652,18 @@ public override async Task RunAsync()
16521652
H.Check("FloatingTitleBar_TabViewHasStripFooter",
16531653
tabViews.Count == 1 && tabViews[0].TabStripFooter is not null);
16541654

1655-
// Pane body must be reachable.
1655+
// Pane body must be reachable. Chrome (TabView etc.) materializes on
1656+
// the first render pump after Open(), but on a loaded CI runner the
1657+
// inner content TextBlock can lag one or two pumps behind. Poll for
1658+
// up to 2s — see INVESTIGATION.md Cluster F.
16561659
var bodyTexts = FindAllInTree<TextBlock>(content, t => t.Text == "floating-tb-body");
1657-
H.Check("FloatingTitleBar_PaneBodyVisible", bodyTexts.Count >= 1);
1660+
var deadline = Environment.TickCount64 + 2_000;
1661+
while (bodyTexts.Count < 1 && Environment.TickCount64 < deadline)
1662+
{
1663+
await Harness.Render(50);
1664+
bodyTexts = FindAllInTree<TextBlock>(content, t => t.Text == "floating-tb-body");
1665+
}
1666+
H.Check($"FloatingTitleBar_PaneBodyVisible (bodies={bodyTexts.Count})", bodyTexts.Count >= 1);
16581667

16591668
floatingWindow.Close();
16601669
await Harness.Render();

0 commit comments

Comments
 (0)