Ensure driver test cleanup preserves primary failures #730
Reference in New Issue
Block a user
Delete Branch "test/task-assertion-return-discard"
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?
Six driver test fixtures could leave their owned probes/resources running when initialization or assertions failed; two also omitted normal-path shutdown. Wrap those bodies in one linked test-only cleanup operation, registered before initialization. It awaits shutdown, preserves the original failure and stack, reports a secondary cleanup failure, and fails on cleanup-only errors. Existing behavioral assertions, probe settings, tokens and deadlines remain intact.
Also explicitly discard five Task-valued ShouldNotBeNull results, preserving their synchronous checks and running-probe assertions. No production or dependency changes. #725 remains open for the remaining warning groups.
Validation: six offline project suites passed 3,323 tests with zero failed/skipped; helper contract tests failed 5/5 with a body-only stub then passed 5/5; removing cleanup made the new real-driver/fake-resource regressions fail in every affected project. Independent scope/quality review passed, and all original assertion lines were retained. Modbus evidence establishes cancellation, fake request completion and transport disposal, not a background probe-task join. Several other drivers have bounded joins; completion is demonstrated only in these fake scenarios. Existing test warnings remain.
Refs #725.
Resolves #726.
Merged main
c89912a9is integrated without conflicts; the resulting tree matches the reviewed integration preflight. Required hosted run988 passed all ten steps on final head4f537a5652eec807ccdc020c7b3ab08a6435fdaf:62TRX reports,14,672executed tests,573individual skips, floor>=12,000 and finalized artifacts. All six affected suites passed3,323/0fail/0skip; completed build emitted zero CS4014 warnings.