summaryrefslogtreecommitdiffstats
path: root/test/functional/util
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2017-05-19 13:07:21 +0200
committerAndrew Lewis <nerf@judo.za.org>2017-05-19 13:07:21 +0200
commit93a5203173727ebd4e3f03685ad55c68b2213852 (patch)
tree55173601b9c81da699167d710d0214e0fc0b0533 /test/functional/util
parent4e141bea0675cd58f9f395637ba4f8e2612cfddc (diff)
downloadrspamd-93a5203173727ebd4e3f03685ad55c68b2213852.tar.gz
rspamd-93a5203173727ebd4e3f03685ad55c68b2213852.zip
[Minor] Add timeouts to dummy socket servers
Diffstat (limited to 'test/functional/util')
-rwxr-xr-xtest/functional/util/dummy_clam.py2
-rwxr-xr-xtest/functional/util/dummy_fprot.py2
2 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/util/dummy_clam.py b/test/functional/util/dummy_clam.py
index 8ef6ef476..6be20de57 100755
--- a/test/functional/util/dummy_clam.py
+++ b/test/functional/util/dummy_clam.py
@@ -8,6 +8,7 @@ try:
import SocketServer as socketserver
except:
import socketserver
+import signal
class MyTCPHandler(socketserver.BaseRequestHandler):
@@ -24,6 +25,7 @@ if __name__ == "__main__":
pid = os.fork()
if pid > 0:
sys.exit(0)
+ signal.alarm(5)
HOST = "localhost"
diff --git a/test/functional/util/dummy_fprot.py b/test/functional/util/dummy_fprot.py
index 64e086241..082934f4d 100755
--- a/test/functional/util/dummy_fprot.py
+++ b/test/functional/util/dummy_fprot.py
@@ -8,6 +8,7 @@ try:
import SocketServer as socketserver
except:
import socketserver
+import signal
class MyTCPHandler(socketserver.BaseRequestHandler):
@@ -24,6 +25,7 @@ if __name__ == "__main__":
pid = os.fork()
if pid > 0:
sys.exit(0)
+ signal.alarm(5)
HOST = "localhost"