Closed sr-gi closed 1 year ago
I fear there is currently no built-in functionality for this case.
Would a MockServer::stop
method and the possibility to set a custom port when starting a test-local mock server (something like MockServer::start_with_port(port)
) be enough for you?
Related: There is a dalay function that (depending on the settings of your HTTP client) may result in a request timeout on the client side. This could already be sufficient to simulate unreachability.
Would a
MockServer::stop
method and the possibility to set a custom port when starting a test-local mock server (something likeMockServer::start_with_port(port)
) be enough for you?
That would be exactly what I'm looking for actually.
Related: There is a dalay function that (depending on the settings of your HTTP client) may result in a request timeout on the client side. This could already be sufficient to simulate unreachability.
I tried this already, but unfortunately it does not work for what I'm intending to do :(
Just checking in. Is there any ETA for MockServer::start_with_port(port)
in case you're considering adding it?
No pressure at all, but it will be really helpful.
There is currently no ETA for this, unfortunately. I'd be very happy to accept a pull request though!
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
I was wondering whether it is currently possible to simulate a
MockServer
being unreachable so client functionality that deals with such issues can be tested.I can kind of replicate this by just starting the server whenever I'd like it to be reachable, but stopping it and starting it again using the same address / port is what seems tricky.