SSHLibrary
SSHLibrary copied to clipboard
Pr/347
Hi @mihaiparvu , issue_347_observation.docx
Scripts used:
Steps to run the script:
- Place the large.html in any of the remote ssh machine under /tmp/ directory
- Provide the ip, username & credentials in test.py
host = "[email protected]"
username = "foo"
password = "bar"
- Run the robot command
robot .\ssh_lib_test.robot
we have tested it in windows, linux & macintosh the results are consistent
• As an alternative we tried
taskset -c 0 time robot ssh_lib_test.robot
• Also, we tried inside docker with alpine linux same issue appears.
Ssh Lib Test | FAIL |
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
==============================================================================`
Output: /opt/vntaf/output.xml
Log: /opt/vntaf/log.html
Report: /opt/vntaf/report.html
Command exited with non-zero status 1
real 0m 31.96s
user 0m 30.62s
sys 0m 0.09s
Observations in our system:
- First option tried: To include time.sleep(0.00001) or time.sleep(0) in _read_until function of abstractclient.py(SSHLibrary) --- Didn’t work
- Changed the SSHLibrary.pythonclient.Shell.read_byte to 500 – Works but not sure whether a proper solution
def read(self):
data = b''
while self._output_available():
data += self._shell.recv(4096)
return data
def read_byte(self):
if self._output_available():
return self._shell.recv(5000)
return b''
Regards, Sathish