Repository navigation
test(python): time template protocol initial delay from connect - #4155
Merged
Merged
Conversation
The initial read delay is measured from connect, but the test started its timer after connect returned, so the measured wait undercounted by connect's own duration and failed on a slow runner (0.0196s < 0.02s). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4155 +/- ##
==========================================
- Coverage 80.28% 80.24% -0.05%
==========================================
Files 909 909
Lines 70551 70551
Branches 2741 2741
==========================================
- Hits 56643 56613 -30
- Misses 13237 13268 +31
+ Partials 671 670 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
1 task done
EmilyRagan
approved these changes
Oct 26, 2026
jmthomas
approved these changes
Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What changed
test_template_protocol.py:test_waits_before_writing_during_the_initial_delay_periodnow starts its timer beforeinterface.connect(). It used to start the timer afterconnect()returned.Why it changed
TemplateProtocolsets its initial-delay deadline inconnect_reset(), which runs duringconnect(). Because the test started timing afterconnect()returned, it missed however longconnect()took. On a slow runner the measured wait could come in just under the configured delay. That happened inunit-test (3.13)on #3948:AssertionError: 0.019564390182495117 not greater than or equal to 0.02. The protocol was working correctly. Only the measurement was wrong.Testing strategy
test_template_protocol.pypass locally.test_waits_no_longer_than_the_initial_delay_before_writingalready checks the protocol doesn't wait longer than configured.🤖 Generated with Claude Code
Summary by CodeRabbit