Skip to content

Conversation

@BrunoMmS
Copy link

Summary

This PR adds native support for simulating request latency in MockTransport by introducing an optional delay parameter.
When provided, the transport sets response.elapsed according to the delay value, unless the handler explicitly defines its own elapsed time.

This resolves the inconvenience described in issue #3712, where users needed to manually patch response.elapsed inside handlers to test timeout- or latency-sensitive logic.

Checklist

  • I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.

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