AbLegacy: route health timestamps through the injectable Clock; drop redundant per-project TreatWarningsAsErrors #768

Closed
opened 2026-11-09 13:35:07 -05:00 by dohertj2 · 1 comment
Owner

AbLegacyDriver stamps health timestamps from raw DateTime.UtcNow (≈ lines 289, 511, 1083); only the backoff path uses the injectable Clock. Tests of those timestamps need spin-waits (#767). Route the health stamps through Clock so tests can control time. Also tidy-up: the 61 per-project TreatWarningsAsErrors lines are redundant since #766 set it globally in Directory.Build.props.

`AbLegacyDriver` stamps health timestamps from raw `DateTime.UtcNow` (≈ lines 289, 511, 1083); only the backoff path uses the injectable `Clock`. Tests of those timestamps need spin-waits (#767). Route the health stamps through `Clock` so tests can control time. Also tidy-up: the 61 per-project `TreatWarningsAsErrors` lines are redundant since #766 set it globally in Directory.Build.props.
dohertj2 added the driver/ablegacytype:debtpriority:p3 labels 2026-11-09 13:35:07 -05:00
Author
Owner

Fixed on master 919009c5: AbLegacyDriver health stamps (and read sample timestamps + host-state change times) read the injectable Clock(); NativePcccBridgeStatusHealthTests uses a manual clock (init T0, read T1) and asserts LastSuccessfulRead == T1 exactly (stronger than the old not-equal + spin). Removed 75 redundant per-project TreatWarningsAsErrors lines (64 src + 11 tests; tools/mem-probe keeps its explicit false). Evidence: AbLegacy 859 passed; all 6 tests in the class fail with the driver change reverted; Release slnx 0 warnings/0 errors; planted CS0168 still fails the build in a src project and in Commons.Tests.

Fixed on master 919009c5: AbLegacyDriver health stamps (and read sample timestamps + host-state change times) read the injectable Clock(); NativePcccBridgeStatusHealthTests uses a manual clock (init T0, read T1) and asserts LastSuccessfulRead == T1 exactly (stronger than the old not-equal + spin). Removed 75 redundant per-project TreatWarningsAsErrors lines (64 src + 11 tests; tools/mem-probe keeps its explicit false). Evidence: AbLegacy 859 passed; all 6 tests in the class fail with the driver change reverted; Release slnx 0 warnings/0 errors; planted CS0168 still fails the build in a src project and in Commons.Tests.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#768