Flaky: MTConnectSubscribeTests.A_rebaseline_that_delivers_nothing_still_advances_the_reconnect_backoff #661

Closed
opened 2026-10-09 05:48:34 -04:00 by dohertj2 · 1 comment
Owner

Failed once in a full-suite run on master 98c00904 (2026-10-09): driver.ReconnectAttempts should be greater than 5 but was 5 (MTConnectSubscribeTests.cs:1071). Passes 8/8 in isolation.

Likely a race in the test: it waits for the 6th sample call (WaitForSampleCallsAsync(6)) and then reads ReconnectAttempts, but the counter is advanced on the pump's backoff path, which can lag the sample-call signal under full-suite load. Fix: wait for the counter itself (poll/AwaitAssert until ReconnectAttempts > early within the watchdog) rather than inferring it from the call count. Test added in 9631a40f (#650 review).

Failed once in a full-suite run on master 98c00904 (2026-10-09): `driver.ReconnectAttempts should be greater than 5 but was 5` (MTConnectSubscribeTests.cs:1071). Passes 8/8 in isolation. Likely a race in the test: it waits for the 6th sample call (`WaitForSampleCallsAsync(6)`) and then reads `ReconnectAttempts`, but the counter is advanced on the pump's backoff path, which can lag the sample-call signal under full-suite load. Fix: wait for the counter itself (poll/AwaitAssert until `ReconnectAttempts > early` within the watchdog) rather than inferring it from the call count. Test added in `9631a40f` (#650 review).
Author
Owner

Fixed and pushed in master fecfdd22 (branch commits 480b000f, 31e2148a). The flaky reconnect test waited on a sample-call proxy that could advance before ReconnectAttempts; both affected tests now wait on ReconnectAttempts itself via a cancellable, watchdog-bounded loop (no background spin). Test-only change. Verified: MTConnectSubscribeTests 10/10 runs green (42 each); full MTConnect suite 633/0 on the merged result.

Fixed and pushed in master `fecfdd22` (branch commits `480b000f`, `31e2148a`). The flaky reconnect test waited on a sample-call proxy that could advance before `ReconnectAttempts`; both affected tests now wait on `ReconnectAttempts` itself via a cancellable, watchdog-bounded loop (no background spin). Test-only change. Verified: MTConnectSubscribeTests 10/10 runs green (42 each); full MTConnect suite 633/0 on the merged result.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#661