diff options
author | Christian Heimes <cheimes@redhat.com> | 2015-07-13 11:07:05 +0200 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2015-07-27 06:35:34 -0400 |
commit | 908574caa96a80483fa642e08b3b1e9ad1cd1c60 (patch) | |
tree | 41b97ac7bdd3314afde0cd3a925998cd70635eca | |
parent | ee720f695b4c5b5098356351acf7d32776f04f2a (diff) | |
download | custodia-908574caa96a80483fa642e08b3b1e9ad1cd1c60.tar.gz custodia-908574caa96a80483fa642e08b3b1e9ad1cd1c60.tar.xz custodia-908574caa96a80483fa642e08b3b1e9ad1cd1c60.zip |
kill() and waitpid() custodia process
The test suite leaves child processes behind. The teardown class method
now call Popen.kill() and Popen.wait() to kill and wait for its child
process.
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
Closes #5
-rw-r--r-- | tests/custodia.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/custodia.py b/tests/custodia.py index 754c1b3..84dc554 100644 --- a/tests/custodia.py +++ b/tests/custodia.py @@ -27,10 +27,8 @@ class CustodiaTests(unittest.TestCase): @classmethod def tearDownClass(self): - try: - os.killpg(self.custodia_process.pid, signal.SIGTERM) - except OSError: - pass + self.custodia_process.kill() + self.custodia_process.wait() for fname in ['server_socket', 'secrets.db']: try: os.unlink(fname) |