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

How to simulate failure scenario ? #25

Open
geranne opened this issue Sep 23, 2021 · 3 comments
Open

How to simulate failure scenario ? #25

geranne opened this issue Sep 23, 2021 · 3 comments

Comments

@geranne
Copy link

geranne commented Sep 23, 2021

The source code that I am creating unit tests has a lot of try catch block. How do I simulate failure scenario, so I can cover those catch blocks ? Is there I way we can customize the response or reply code of the different SFTP commands ?

@stefanbirkner
Copy link
Owner

Can you give an example of such a failure scenario?

@geranne
Copy link
Author

geranne commented Nov 24, 2021

Can you give an example of such a failure scenario?

Let"s say there is a network communication failure.

@stefanbirkner
Copy link
Owner

stefanbirkner commented Nov 27, 2021

For simulating network failures I suggest to use a proxy that can simulate network errors. For network errors you usually don't get an answer from the SFTP server at all and therefore this behaviour is not something I would like tom implement in the SFTP server. Does this answer help you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants