Skip to content

LatencyPlugin never applies maxMs because the upper bound is exclusive #1927

Closed

Description

@waldekmastykarz

Description

LatencyPlugin never applies the configured maxMs delay. The delay is computed as:

_random.Next(Configuration.MinMs, Configuration.MaxMs)

Random.Next(min, max) treats max as exclusive, so the largest possible delay is maxMs - 1. The schema describes maxMs as "The maximum amount of delay (in milliseconds) added to a request", which implies it's inclusive.

Code:

Expected behavior

The delay is chosen from the inclusive range minMs..maxMs, for example by using _random.Next(Configuration.MinMs, Configuration.MaxMs + 1).

Activity

  1. linked a pull request that will close this issueMake LatencyPlugin's maxMs inclusive #1930on Oct 20, 2026
  2. added a commit that references this issue on Oct 20, 2026
    bf75426
  3. added a commit that references this issue on Oct 21, 2026
    27c6f56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions