yanne / api-test

0 stars 0 forks source link

Not possible to gracefully stop hanging `Execute Command` #95

Closed yanne closed 10 years ago

yanne commented 10 years ago

Example test case: * Settings * Library SSHLibrary prompt=\$ Resource resu.txt

* Variables *

* Test Cases * test function [Timeout] 20 seconds Open Connection ${server} timeout=3 seconds Login ${nimi} ${salasana} Execute Command ls Execute Command cat # This hangs forever and only way to stop is by terminate (timeout does not work) [teardown] Close All Connections

This issue was originally opened at Google Code on Jan 8, 2014.

yanne commented 10 years ago

Original comment by mikko.ko...@gmail.com on Jan 21, 2014.

exec_command has a timeout option in paramiko thus at least in python case this should be trivial to fix

http://docs.paramiko.org/paramiko.SSHClient-class.html

yanne commented 10 years ago

Original comment by pekka.klarck on Feb 3, 2014.

There are two things we can do:

1) Try to fix hanging so that ctrl-c and Robot's timeouts can stop the keyword.

2) Add separate timeout argument to Execute Command. A problem with this is that it doesn't help much if the command hands and it has no timeout set. It would be a useful feature in general, though, so it might be worth adding even if resolving 1) is possible. That would, however, require a separate issue.

yanne commented 10 years ago

Original comment by mikko.ko...@gmail.com on Feb 3, 2014.

1) Graceful wait to allow ctrl-c and timeouts to work

Done in r902f7d10f16f

Test added in rda91889da749

NOTE! This has a dependency to robotstatuschecker (pip install robotstatuschecker)

yanne commented 10 years ago

Original comment by mikko.ko...@gmail.com on Feb 5, 2014.

All tests are passing. Marking issue as done.