Skip to content

Make the timing tolerance an option: test.timingToleranceMs - #97

Merged
jadamcrain merged 1 commit into
mainfrom
timing-tolerance-option
Oct 16, 2026
Merged

jadamcrain merged 1 commit into
mainfrom
timing-tolerance-option

Conversation

@jadamcrain

Copy link
Copy Markdown
Member

dnp3c allowed two fixed tolerances on the times it measures: 500 ms on the intervals it times (e.g. unsolicited retries) and 200 ms past each timeout it waits on. Neither could be changed, so a run on a busy machine could fail a timing check with no way to allow for it (#93).

Both are now one option, test.timingToleranceMs, with a default of 500 ms. It loosens checks both ways. Only steps that expect no message wait longer: a read that gets its message returns as soon as it arrives. The comment that said the 500 ms came from 8.11.2.1 is gone.

  • UnconfirmedResponse, the unsolicited step builders and DefaultTestDriver take the tolerance; the procedures read it from the options.
  • docs/manual-testing.md has a short section on timing, and CHANGELOG.md 0.2.0 notes that waits past a timeout are 300 ms longer by default.

Tested with mvn test (582 tests), and in stepfunc/dnp3's conformance CI on dnp3c-3.1r1 with this commit pinned: 2.7 level 2 and 3.1r1 level 3 both pass (https://github.com/stepfunc/dnp3/actions/runs/38842972647).

dnp3c allowed two fixed tolerances on the times it measures: 500 ms on
the intervals it times, e.g. unsolicited retries, and 200 ms past each
timeout it waits on. Neither could be changed, so a run on a busy
machine could fail a timing check with no way to allow for it (#93).

Both are now test.timingToleranceMs, 500 ms by default. Only the steps
that expect no message wait longer for it: a read that gets its message
returns as soon as it arrives.
@jadamcrain
jadamcrain added this pull request to the merge queue Oct 16, 2026
Merged via the queue into main with commit 8812099 Oct 16, 2026
4 checks passed
@jadamcrain
jadamcrain deleted the timing-tolerance-option branch October 16, 2026 03:19
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.

1 participant