Skip to content

Inverted message delay toggle, changed field names and added logging#35

Merged
AndersMariegaard merged 2 commits into
mainfrom
invert-MessageDelay-toggle
Dec 21, 2025
Merged

Inverted message delay toggle, changed field names and added logging#35
AndersMariegaard merged 2 commits into
mainfrom
invert-MessageDelay-toggle

Conversation

@AndersMariegaard
Copy link
Copy Markdown
Contributor

This pull request refactors the message delivery testing configuration and logic to improve clarity and flexibility. It renames several fields in the TestConfig struct for better readability, replaces the ReorderMessages flag with a more explicit DisableMessageDelays, and introduces a FillDefaults method for setting sensible defaults. The changes are reflected throughout the controller logic and tests.

Test configuration refactor:

  • Renamed DropProb and DupeProb to MsgDropProb and MsgDupeProb, and replaced ReorderMessages with DisableMessageDelays for clearer intent in the TestConfig struct. Renamed ReorderMinDelay/ReorderMaxDelay to MsgMinDelay/MsgMaxDelay. Also, NetworkSpikeEnabled is now EnableNetworkSpikes.
  • Added a FillDefaults method to TestConfig to set default values for message delays and network spike probabilities if they are not provided or are out of range, replacing the old NewTestConfig constructor.

Controller logic updates:

  • Updated message event handling to use the new field names and logic: checks now use MsgDropProb, MsgDupeProb, and DisableMessageDelays instead of the old names.
  • Refactored message delay and spike handling to use the new configuration fields, and improved spike logic to ensure spike delays are respected and logged. [1] [2] [3]

Test updates:

  • Updated all tests to use the new configuration field names and logic, ensuring consistency with the refactored TestConfig and message handling. [1] [2] [3] [4]

Dependency update:

  • Updated the github.com/distcodep7/dsnet dependency from v0.0.9 to v0.0.14 in prebundle/go.mod.

@AndersMariegaard AndersMariegaard merged commit 661b4b6 into main Dec 21, 2025
2 checks passed
@AndersMariegaard AndersMariegaard deleted the invert-MessageDelay-toggle branch December 21, 2025 01:37
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