Skip to content

Retry when tor fails

Some scenarios uses the live Tor network, which is not entirely reliable, so we may get failing scenarios when in fact we just happened to pick a Tor circuit that’s too slow, or even one that’s broken but Tor fails to remedy the situation.

I’ve never experienced it yet, and I’ve run the test suite on pretty bad connections, so perhaps let’s just wait a while and see if this problem happens in practice, and then retag this ticket todo/code? —intrigeri

For this reason we should tag such scenarios with @uses_tor, and create an Around('@uses_tor') hook which re-tries those scenarios some number of times before actually failing it. That hook should retry only when it catches some custom exception (e.g. TorFailed) that we make steps throw whenever something that uses Tor times out, but it should not retry for other exceptions.

Related issues

Original created by @tails on 5770 (Redmine)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information