DashboardSnapshotPublisher hot-spins: no reconnect delay when the snapshot watch completes cleanly #222
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
DashboardSnapshotPublisherreconnects afterReconnectDelayonly on the exception path. WhenWatchSnapshotsAsynccompletes cleanly it re-subscribes immediately, so a snapshot source that completes at once makes the publisher hot-spin (demonstrated by the test fakeCompleteImmediatelySnapshotService; the test was renamed..._Resubscribesin #205 because it never tested a delay). The class doc says it reconnects after the delay. Apply the delay on clean completion too (fake-time test now possible via the #205 TimeProvider seam).Fixed on main
bc28e143: DashboardSnapshotPublisher waits the reconnect delay after a clean completion of the snapshot watch, as the fault path already did. Test ExecuteAsync_WhenSnapshotServiceCompletes_ResubscribesOnlyAfterReconnectDelay (fake clock): no resubscribe at delay−1 ms, one at the delay; fails with the fix stashed (reconnect timer never armed in the hot-spin code). Evidence: NonWindows.slnx 0 warnings/0 errors; MxGateway.Tests 1395 passed / 2 skipped.