[tor-commits] [stem/master] OSX sucks at terminating processes
atagar at torproject.org
atagar at torproject.org
Mon Jun 25 01:45:02 UTC 2012
commit 1c0152185a9ff27a49f6491bcd2ea06f64158820
Author: Damian Johnson <atagar at torproject.org>
Date: Sat Jun 23 14:36:08 2012 -0700
OSX sucks at terminating processes
Our os.kill() call evidently doesn't kill tor right away on OSX, causing tests
to disrupt each other (port conflicts).
---
test/integ/process.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/test/integ/process.py b/test/integ/process.py
index 423b2c3..58440e0 100644
--- a/test/integ/process.py
+++ b/test/integ/process.py
@@ -51,6 +51,12 @@ class TestProcess(unittest.TestCase):
tor_process.kill()
elif not stem.util.system.is_windows():
os.kill(tor_process.pid, signal.SIGTERM)
+
+ # On OSX, python 2.5 this kill call doesn't seem to block, causing our
+ # tor instance to linger and cause a port conflict with the following
+ # test. Giving it a moment to kill for realz.
+
+ time.sleep(0.5)
def test_launch_tor_with_timeout(self):
"""
More information about the tor-commits
mailing list