You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm able to circumvent around the issue by using this keyword which I copy-pasted from the test cases of the SSHLibrary, but I still think it would be nice to fix the actual issue:
Port Should Be Free
[Arguments] ${port}
${result} Run Keyword If os.sep == '/'
... Run netstat -tulpn
... ELSE
... Run netstat -an
Should Not Contain ${result} :${port}
[Return] ${result}
and then call Wait Until Keyword Succeeds 2 min 10s Port Should Be Free ${local_port} before calling the "Create Local Ssh Tunnel"
From the documentatin of socketserver:
"Finally, call server_close() to close the socket (unless you used a with statement).". So I think the line self.server.server_close() should be added after the shutdown to clean things up
mikatammi
added a commit
to mikatammi/SSHLibrary
that referenced
this issue
Nov 3, 2023
Steps to reproduce:
Have multiple test cases run after another, which do "Create Local Ssh Tunnel" in setup-phase, and "Close All Connections" in teardown-phase.
Expected results:
Close All Connections
would close all the connections, and then theCreate Local Ssh Tunnel
would simply work.What really happens:
As in the picture below, the tests start to say
OSError: [Errno 98] Address already in use
I'm suspecting there should be some kind of wait, eg.
t.wait()
for the thread after calling shutdown here: https://github.com/robotframework/SSHLibrary/blob/master/src/SSHLibrary/pythonforward.py#L44The text was updated successfully, but these errors were encountered: