I've got an "old" laptop running Lubuntu which i run Robotframework scripts on, connected to a raspberrypi (via ethernet cable).
The laptop has paramiko 2.7.1 and otherwise up to date python packages (let me know if you want versions of specific packages).
These tests include opening, connecting and executing commands via SSH.
There are zero problems with SSH outside robotframework test scripts and never had any instability with ssh.
When i run the robot script, it executes some commands (with Execute Command
keywords) and checks if the commands are completed successfully.
More often than not, one or two of the 8 (even sometimes 4) tests fail because of the SSHLibrary exception SSHLibrary Exception: Timeout opening tunnel
.
For now I've set up a script that automatically reruns the failed test cases and 99% of the time, the rerun test cases pass. I would however much rather have stable test cases.
I would consider a reasonable increase of the SSH timeout to resolve the issue. These are your options:
You can set a timeout at library import.
Library SSHLibrary 10 seconds
You can set the connection timeout when you open the connection.
Open Connection 192.168.1.1 timeout=5 min
Lastly you can set the timeout on the fly using the Set Client Configuration keyword.
Set Client Configuration timeout=1 min