tests: Ensure the daemon exits with no error

We did terminate the daemon and waited for it, but we did not ensure
that it was terminated with no error.

This is particularly a problem when we are running the sanitizers or
valgrind, because we didn't catch any error.

Thus... We were living with some leaks that we never caught :)
This commit is contained in:
Marco Trevisan (Treviño) 2024-02-14 23:13:24 +01:00
parent d1a6e92582
commit e1c83e8b27

View file

@ -258,7 +258,7 @@ class Tests(dbusmock.DBusTestCase):
self.daemon.terminate()
except OSError:
pass
self.daemon.wait(timeout=3000)
self.assertEqual(self.daemon.wait(timeout=3000), 0)
self.daemon = None
self.proxy = None