Skip to content
  • intrigeri's avatar
    Test suite: make the "SSH is using the default SocksPort" scenario more robust (refs: #17163) · 4353ed57
    intrigeri authored
    This scenario failed 12 times in the last 16 test suite runs on the testing
    branch, so it's starting to be really annoying.
    
    Every time, SSH immediately fails with "nc: connection failed, SOCKSv5 error:
    General SOCKS server failure". I suspect there's a bug in our test suite, that
    makes us try to use Tor before it's ready. Regardless, we have a very similar
    test case in ssh.feature that is pretty robust: it never failed in the 16 test
    suite runs I've analyzed. I see two main potential reasons for this difference:
    
     - In tor_stream_isolation.feature we have the "I monitor the network
       connections of SSH" CPU hog running. This might make it harder for tor to do
       its job.
    
     - In ssh.feature, we use retry_tor so we retry up to
       MAX_NEW_TOR_CIRCUIT_RETRIES (default: 10); while in
       tor_stream_isolation.feature we only run SSH once.
    
    In short, the fragile scenario runs in a context that makes it more likely to
    fail, and it does not retry. So it's not very surprising that it's more fragile.
    
    Therefore, let's simply reuse the existing, robust implementation we have for
    a test connecting to a SSH server on the Internet. In passing, we get rid
    of one picture, which is always welcome.
    4353ed57