summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrvi <crvisqr@gmail.com>2020-08-14 01:31:10 +0530
committercrvi <crvisqr@gmail.com>2020-08-14 03:44:02 +0530
commit550031310c4c6ef34e78fe029e2b239d44095d4f (patch)
tree28fad016f6cab8fe4b88b5b03534aa8e898a266e
parent89d998acb9999721b6fec77976aaae9870eb1424 (diff)
downloadzeitgeist-550031310c4c6ef34e78fe029e2b239d44095d4f.tar.gz
test: fix ZeitgeistRemoteInterfaceTest::testQuit test failure
====================================================================== ERROR: testQuit (remote-test.ZeitgeistRemoteInterfaceTest) Calling Quit() on the remote interface should shutdown the ---------------------------------------------------------------------- Traceback (most recent call last): File "zeitgeist/test/dbus/remote-test.py", line 500, in testQuit self.client._iface.Quit() File "test/dbus/../../zeitgeist/client.py", line 132, in _ProxyMethod return self._disconnection_safe( File "test/dbus/../../zeitgeist/client.py", line 122, in _disconnection_safe return reconnecting_error_handler(e) File "test/dbus/../../zeitgeist/client.py", line 120, in _disconnection_safe return method_getter()(*args, **kwargs) File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 141, in __call__ return self._connection.call_blocking(self._named_service, File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking reply_message = self.send_message_with_reply_and_block( dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying
-rw-r--r--test/dbus/remote-test.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/dbus/remote-test.py b/test/dbus/remote-test.py
index fdfdc5ab..1463ebaa 100644
--- a/test/dbus/remote-test.py
+++ b/test/dbus/remote-test.py
@@ -30,6 +30,7 @@ from zeitgeist.datamodel import (Event, Subject, Interpretation, Manifestation,
TimeRange, StorageState, DataSource, NULL_EVENT, ResultType)
import testutils
+from dbus.exceptions import DBusException
from testutils import parse_events, import_events
class ZeitgeistRemoteAPITest(testutils.RemoteTestCase):
@@ -497,7 +498,12 @@ class ZeitgeistRemoteInterfaceTest(testutils.RemoteTestCase):
Calling Quit() on the remote interface should shutdown the
engine in a clean way.
"""
- self.client._iface.Quit()
+ try:
+ self.client._iface.Quit()
+ except DBusException as e:
+ # expect a silent remote disconnection
+ if e.get_dbus_name() != "org.freedesktop.DBus.Error.NoReply":
+ raise (e)
self.daemon.wait()
self.assertRaises(OSError, self.kill_daemon)
self.spawn_daemon()