Test timing leftovers: Worker.Tests unchecked/unbounded waits, two feed-test sleeps, shared wait helper #223

Closed
opened 2026-11-09 13:10:08 -05:00 by dohertj2 · 2 comments
Owner

Leftovers from #205/#221:

  • Worker.Tests: FakeRuntimeSession.cs:106 ignores the bool from releaseDispatch.Wait(BlockedDispatchSafetyNet); done.Wait() calls in the live-smoke probe files block with no timeout. Make each assert / bound (build + run on windev).
  • MxGateway.Tests: DashboardSnapshotFeedTests.WatchAsync_WhenAJoinerLeavesWhileAnOldGenerationLingers... keeps two 150 ms real sleeps (interleaving + negative check) — needs a small internal pump-idle signal on DashboardSnapshotFeed.
  • Alarm-monitor tests still poll (2 ms) on unsignalled state; private WaitUntilAsync helpers in EventStreamServiceTests, DashboardEventBroadcasterTests, GatewaySessionDashboardMirrorTests, AlarmsPageTruncationBannerTests could share TestSupport/Eventually.
Leftovers from #205/#221: - Worker.Tests: `FakeRuntimeSession.cs:106` ignores the bool from `releaseDispatch.Wait(BlockedDispatchSafetyNet)`; `done.Wait()` calls in the live-smoke probe files block with no timeout. Make each assert / bound (build + run on windev). - MxGateway.Tests: `DashboardSnapshotFeedTests.WatchAsync_WhenAJoinerLeavesWhileAnOldGenerationLingers...` keeps two 150 ms real sleeps (interleaving + negative check) — needs a small internal pump-idle signal on DashboardSnapshotFeed. - Alarm-monitor tests still poll (2 ms) on unsignalled state; private WaitUntilAsync helpers in EventStreamServiceTests, DashboardEventBroadcasterTests, GatewaySessionDashboardMirrorTests, AlarmsPageTruncationBannerTests could share TestSupport/Eventually.
dohertj2 added the area:teststype:testpriority:p3 labels 2026-11-09 13:10:08 -05:00
Author
Owner

Worker.Tests part done on main 381e7727: FakeRuntimeSession throws TimeoutException when releaseDispatch.Wait(BlockedDispatchSafetyNet) times out; the done.Wait() calls in AlarmSubtagLiveSmokeTests (2), AlarmClientWmProbeTests, AlarmsLiveSmokeTests and WnWrapConsumerProbeTests are bounded (10 min) and asserted, and probe threads are background so a hung COM call can't keep the test host alive. windev Worker.Tests 759 passed / 12 skipped. The gateway-test part (feed pump-idle hook, shared wait helper) is in progress separately — issue stays open until it lands.

Worker.Tests part done on main 381e7727: FakeRuntimeSession throws TimeoutException when releaseDispatch.Wait(BlockedDispatchSafetyNet) times out; the done.Wait() calls in AlarmSubtagLiveSmokeTests (2), AlarmClientWmProbeTests, AlarmsLiveSmokeTests and WnWrapConsumerProbeTests are bounded (10 min) and asserted, and probe threads are background so a hung COM call can't keep the test host alive. windev Worker.Tests 759 passed / 12 skipped. The gateway-test part (feed pump-idle hook, shared wait helper) is in progress separately — issue stays open until it lands.
Author
Owner

Gateway-test part done on main 09b3ecdd (Worker.Tests part was 381e7727): DashboardSnapshotFeed gains internal test hooks WhenIdleGateClosedAsync (backing TCS only allocated when a test waits) + IsPumpIdle; the WhenAJoinerLeavesWhileAnOldGenerationLingers test drops both 150 ms sleeps (reintroducing the old global empty-subscriber bug now fails with a 5 s timeout — the sleep version passed). TestSupport/Eventually gains an optional description + async condition; private poll loops in EventStreamServiceTests, GatewaySessionDashboardMirrorTests, DashboardEventBroadcasterTests and AlarmsPageTruncationBannerTests now use it. Evidence: the 5 changed classes (54 tests) 10/10 runs; MxGateway.Tests 1407 passed / 2 skipped after rebase; slnx 0 warnings.

Gateway-test part done on main 09b3ecdd (Worker.Tests part was 381e7727): DashboardSnapshotFeed gains internal test hooks WhenIdleGateClosedAsync (backing TCS only allocated when a test waits) + IsPumpIdle; the WhenAJoinerLeavesWhileAnOldGenerationLingers test drops both 150 ms sleeps (reintroducing the old global empty-subscriber bug now fails with a 5 s timeout — the sleep version passed). TestSupport/Eventually gains an optional description + async condition; private poll loops in EventStreamServiceTests, GatewaySessionDashboardMirrorTests, DashboardEventBroadcasterTests and AlarmsPageTruncationBannerTests now use it. Evidence: the 5 changed classes (54 tests) 10/10 runs; MxGateway.Tests 1407 passed / 2 skipped after rebase; slnx 0 warnings.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/mxaccessgw#223