aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2016-07-21 14:38:14 +0100
committerAndrew Lewis <nerf@judo.za.org>2016-07-21 14:44:13 +0100
commitae2dd89408fe0b0249dd9e91353f75a2360edb97 (patch)
tree1d8aba300a44dac0a80f703092273577e85c0f71 /test/functional
parentb272b9ea6fb05c9a7d233076cd7c5c18386e6fbe (diff)
downloadrspamd-ae2dd89408fe0b0249dd9e91353f75a2360edb97.tar.gz
rspamd-ae2dd89408fe0b0249dd9e91353f75a2360edb97.zip
[Test] Fix braindamaged shutdown_process function
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/lib/rspamd.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/test/functional/lib/rspamd.py b/test/functional/lib/rspamd.py
index 6d03c4d5f..56356e599 100644
--- a/test/functional/lib/rspamd.py
+++ b/test/functional/lib/rspamd.py
@@ -73,16 +73,11 @@ def shutdown_process(pid):
pid = int(pid)
process_should_exist(pid)
i = 0
- while i < 5:
+ while i < 100:
try:
os.kill(pid, signal.SIGTERM)
- time.sleep(0.1)
- except:
+ except OSError as e:
+ assert e.errno == 3
break
- if i >= 5:
- while True:
- try:
- os.kill(pid, signal.SIGTERM)
- time.sleep(0.1)
- except:
- break
+ i += 1
+ time.sleep(0.1)