aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional/lib/rspamd.py
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2017-06-30 13:55:18 +0200
committerAndrew Lewis <nerf@judo.za.org>2017-06-30 14:02:40 +0200
commitfc6155ae6b86ac4a7ec8dfa752e6b7f195f2d976 (patch)
treeb0993673ef68eaf7065b8855b05721717b13aa3e /test/functional/lib/rspamd.py
parent9be11035d0ce5e64627fb8f7cf577d35cc46f6cf (diff)
downloadrspamd-fc6155ae6b86ac4a7ec8dfa752e6b7f195f2d976.tar.gz
rspamd-fc6155ae6b86ac4a7ec8dfa752e6b7f195f2d976.zip
[Minor] Tests: don't try bind ports
Diffstat (limited to 'test/functional/lib/rspamd.py')
-rw-r--r--test/functional/lib/rspamd.py20
1 files changed, 0 insertions, 20 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()