Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow timeout simulations in replies #169

Open
ghost opened this issue Dec 27, 2023 · 2 comments
Open

Allow timeout simulations in replies #169

ghost opened this issue Dec 27, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Dec 27, 2023

The current implementation of the http_mock_adapter library provides a convenient way to mock server responses with the delay parameter in the MockServer reply. However, it lacks the ability to simulate connection, receive, or send timeouts, limiting its usefulness in testing scenarios that involve timeout-related behaviors.

Feature Request:
It would be great to extend the functionality of the MockServer to include the ability to simulate connection, receive, and send timeouts explicitly. This enhancement will enable users to test and verify how their code handles different timeout scenarios, leading to more comprehensive and robust test coverage.

The suggested enhancement should allow users to specify connection, receive or send delay parameters configuration, which could be used to reflect timeouts defined in the Dio instance options.

Expected Outcome:
With this enhancement, users can precisely control and simulate various timeout scenarios during testing, ensuring that their code behaves correctly in real-world networking conditions.

@LukaGiorgadze
Copy link
Member

Thank you @kaminoan-dev for your feedback! This is interesting and I would be glad to see this feature in the upcoming releases. @cyberail thoughts?

@LukaGiorgadze LukaGiorgadze added the enhancement New feature or request label Dec 27, 2023
@cyberail
Copy link
Collaborator

Agreed sounds really great. I will take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants