diff options
author | Andrew Lewis <nerf@judo.za.org> | 2017-06-30 13:55:18 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2017-06-30 14:02:40 +0200 |
commit | fc6155ae6b86ac4a7ec8dfa752e6b7f195f2d976 (patch) | |
tree | b0993673ef68eaf7065b8855b05721717b13aa3e /test/functional/lib | |
parent | 9be11035d0ce5e64627fb8f7cf577d35cc46f6cf (diff) | |
download | rspamd-fc6155ae6b86ac4a7ec8dfa752e6b7f195f2d976.tar.gz rspamd-fc6155ae6b86ac4a7ec8dfa752e6b7f195f2d976.zip |
[Minor] Tests: don't try bind ports
Diffstat (limited to 'test/functional/lib')
-rw-r--r-- | test/functional/lib/rspamd.py | 20 | ||||
-rw-r--r-- | test/functional/lib/rspamd.robot | 2 |
2 files changed, 0 insertions, 22 deletions
diff --git a/test/functional/lib/rspamd.py b/test/functional/lib/rspamd.py index fd1907384..76af7864d 100644 --- a/test/functional/lib/rspamd.py +++ b/test/functional/lib/rspamd.py @@ -1,6 +1,5 @@ import demjson import grp -import ipaddress import os import os.path import psutil @@ -200,22 +199,3 @@ def shutdown_process_with_children(pid): shutdown_process(child.pid) except: pass - -def wait_for_port(proto, addr, num): - i = ipaddress.ip_address(addr) - if (i.version == 6): - af = socket.AF_INET6 - else: - af = socket.AF_INET - while True: - try: - s = socket.socket(af, proto) - s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - s.bind((addr, num)) - if (proto == socket.SOCK_STREAM): - s.listen(0) - break - except: - pass - time.sleep(0.01) - s.close() diff --git a/test/functional/lib/rspamd.robot b/test/functional/lib/rspamd.robot index 3044b8292..e90ed9ee0 100644 --- a/test/functional/lib/rspamd.robot +++ b/test/functional/lib/rspamd.robot @@ -71,8 +71,6 @@ Generic Teardown Run Keyword If '${CONTROLLER_ERRORS}' == 'True' Check Controller Errors Shutdown Process With Children ${RSPAMD_PID} Cleanup Temporary Directory ${TMPDIR} - : FOR ${i} IN @{ports} - \ Wait For Port @{i}[0] @{i}[1] @{i}[2] Log Logs [Arguments] ${logfile} ${position} |