SSHLibrary icon indicating copy to clipboard operation
SSHLibrary copied to clipboard

Pr/347

Open sathishsms opened this issue 5 years ago • 0 comments

Hi @mihaiparvu , issue_347_observation.docx

Scripts used:

scripts.zip

Steps to run the script:

  1. Place the large.html in any of the remote ssh machine under /tmp/ directory
  2. Provide the ip, username & credentials in test.py
host = "[email protected]"
username = "foo"
password = "bar"
  1. 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:

  1. First option tried: To include time.sleep(0.00001) or time.sleep(0) in _read_until function of abstractclient.py(SSHLibrary) --- Didn’t work
  2. 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

sathishsms avatar Jul 03 '20 17:07 sathishsms