Repository navigation
Make the timing tolerance an option: test.timingToleranceMs - #97
Merged
Merged
Conversation
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.
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.
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 andDefaultTestDrivertake the tolerance; the procedures read it from the options.docs/manual-testing.mdhas a short section on timing, andCHANGELOG.md0.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 ondnp3c-3.1r1with this commit pinned: 2.7 level 2 and 3.1r1 level 3 both pass (https://github.com/stepfunc/dnp3/actions/runs/38842972647).