Repository navigation
test(canopen): the next transfer's SDO timeout is beyond any stall in the stale-outcome tests - #335
Conversation
… the stale-outcome tests Nobody answers server 0x11 in these tests, so the only way the next transfer can end on its own is its SDO timeout; a loaded host once took the 30 s allowed and the assertion read that timeout as the stale outcome's doing (#311). The cancellation removes the session and cancels the caller's task in one actor turn, before the caller can start the next transfer, and a late send outcome is identity-checked against the live session, so the stale outcome cannot reach it; 0 of 40 runs under CPU load with coverage reproduced the failure. Closes #311 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
PR SummaryLow Risk Overview In Comments document that rationale and note the follow-on transfer is still cancelled at the end of the test so a long timeout cannot leave work running. Reviewed by Cursor Bugbot for commit c718751. Bugbot is set up for automated code reviews on this repo. Configure here. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
What does this change?
Closes #311. In
CanOpenSdoClientSendFailureTests.A_Send_Outcome_Of_A_Cancelled_Block_Transfer_Touches_Nothing(and its end-acknowledgement sibling) nobody answers server 0x11, so the only way the next transfer can end on its own is its SDO timeout — 30 s. A loaded host once took that long in a coverage run, and the assertionnext.IsCompleted == falseread the timeout as the stale outcome's doing. The timeout is now 10 minutes; the transfer is cancelled at the end of the test regardless.Why the stale outcome cannot reach the next transfer, from the code: the caller's cancellation is posted to the actor, which removes the session and cancels the caller's task in one turn, so the next
BeginSdoBlockUploadalways runs after the removal; and a late send outcome is checked against the live session by identity (IsLiveBlockSend) before it touches anything. 0 of 40 runs under CPU load with coverage collection reproduced the failure.No source change.
Type of change
docs/test/refactor/chore/ci— no releaseChecklist
dotnet build CanKit.Pro.sln -c Release -p:CI=truesucceedsdotnet test CanKit.Pro.sln -c Release --framework net10.0passes (2423) after the base mergedotnet format --verify-no-changesclean🤖 Generated with Claude Code