Skip to content

test(canopen): the next transfer's SDO timeout is beyond any stall in the stale-outcome tests - #335

Merged
dborgards merged 2 commits into
mainfrom
test/311-block-send-outcome
Oct 20, 2026
Merged

dborgards merged 2 commits into
mainfrom
test/311-block-send-outcome

Conversation

@dborgards

@dborgards dborgards commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

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 assertion next.IsCompleted == false read 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 BeginSdoBlockUpload always 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 release

Checklist

🤖 Generated with Claude Code

dborgards and others added 2 commits October 20, 2026 15:34
… 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>
@cursor

cursor Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Test-only timeout and comment updates in one file; no runtime or library behavior changes.

Overview
Test-only fix for flaky stale-outcome assertions (closes #311). No production code changes.

In CanOpenSdoClientSendFailureTests, the two theory tests that verify late send/end-ack outcomes after cancellation do not affect a missing or in-flight next block upload now use SdoTimeout of 10 minutes instead of 30 seconds. When server 0x11 never answers, the follow-on transfer can only finish via that timeout; on a loaded CI host the old 30 s window sometimes completed next and made next.IsCompleted == false look like a stale-outcome bug.

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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T13:44:59.895248Z c718751 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codecov

codecov Bot commented Oct 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@dborgards
dborgards merged commit 345de1b into main Oct 20, 2026
13 checks passed
@dborgards
dborgards deleted the test/311-block-send-outcome branch October 20, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(canopen): investigate stale block-send outcome assertion failing on main

1 participant