]> source.dussan.org Git - rspamd.git/commitdiff
[Test] Fix braindamaged shutdown_process function 737/head
authorAndrew Lewis <nerf@judo.za.org>
Thu, 21 Jul 2016 13:38:14 +0000 (14:38 +0100)
committerAndrew Lewis <nerf@judo.za.org>
Thu, 21 Jul 2016 13:44:13 +0000 (14:44 +0100)
test/functional/lib/rspamd.py

index 6d03c4d5fc28b042753d6467eb41665a19548abb..56356e599fed47eff35c4fd6cc9a0673c26ff26c 100644 (file)
@@ -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)