diff options
-rw-r--r-- | test/functional/lib/rspamd.py | 15 |
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) |