>Use system bus instead of session bus; this is helpful for the mocks to work
>like the real service and for consistency with production.
This generally looks good, except that running the test suite locally produces
errors for me, of the kind:
======================================================================
ERROR: test_cancel (systemimage.tests.test_dbus.TestDBus)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/dbus/bus.py", line 175, in activate_name_owner
return self.get_name_owner(bus_name)
File "/usr/lib/python3/dist-packages/dbus/bus.py", line 361, in get_name_owner
's', (bus_name,), **keywords)
File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'com.canonical.SystemImage': no such name
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./systemimage/tests/test_dbus.py", line 133, in setUp
super().setUp()
File "./systemimage/tests/test_dbus.py", line 69, in setUp
'com.canonical.SystemImage', '/Service')
File "/usr/lib/python3/dist-packages/dbus/bus.py", line 241, in get_object
follow_name_owner_changes=follow_name_owner_changes)
File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 248, in __init__
self._named_service = conn.activate_name_owner(bus_name)
File "/usr/lib/python3/dist-packages/dbus/bus.py", line 180, in activate_name_owner
self.start_service_by_name(bus_name)
File "/usr/lib/python3/dist-packages/dbus/bus.py", line 278, in start_service_by_name
'su', (bus_name, flags)))
File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ChildExited: Process /home/barry/projects/phone/client/.tox/py33/bin/python exited with status 2
I will investigate.
As for test_lp1199361, that one is a bit flaky on some hardware. I haven't
figured out why though, and it does seem to pass for me on my desktop and the
buildds.
On Jul 30, 2013, at 10:48 AM, Loïc Minier wrote:
>Use system bus instead of session bus; this is helpful for the mocks to work
>like the real service and for consistency with production.
This generally looks good, except that running the test suite locally produces
errors for me, of the kind:
======= ======= ======= ======= ======= ======= ======= ======= ======= ======= tests.test_ dbus.TestDBus) ------- ------- ------- ------- ------- ------- ------- ------- ------- python3/ dist-packages/ dbus/bus. py", line 175, in activate_name_owner name_owner( bus_name) python3/ dist-packages/ dbus/bus. py", line 361, in get_name_owner python3/ dist-packages/ dbus/connection .py", line 651, in call_blocking .DBusException: org.freedesktop .DBus.Error. NameHasNoOwner: Could not get owner of name 'com.canonical. SystemImage' : no such name
ERROR: test_cancel (systemimage.
-------
Traceback (most recent call last):
File "/usr/lib/
return self.get_
File "/usr/lib/
's', (bus_name,), **keywords)
File "/usr/lib/
message, timeout)
dbus.exceptions
During handling of the above exception, another exception occurred:
Traceback (most recent call last): tests/test_ dbus.py" , line 133, in setUp tests/test_ dbus.py" , line 69, in setUp canonical. SystemImage' , '/Service') python3/ dist-packages/ dbus/bus. py", line 241, in get_object name_owner_ changes= follow_ name_owner_ changes) python3/ dist-packages/ dbus/proxies. py", line 248, in __init__ _named_ service = conn.activate_ name_owner( bus_name) python3/ dist-packages/ dbus/bus. py", line 180, in activate_name_owner start_service_ by_name( bus_name) python3/ dist-packages/ dbus/bus. py", line 278, in start_service_ by_name python3/ dist-packages/ dbus/connection .py", line 651, in call_blocking .DBusException: org.freedesktop .DBus.Error. Spawn.ChildExit ed: Process /home/barry/ projects/ phone/client/ .tox/py33/ bin/python exited with status 2
File "./systemimage/
super().setUp()
File "./systemimage/
'com.
File "/usr/lib/
follow_
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
'su', (bus_name, flags)))
File "/usr/lib/
message, timeout)
dbus.exceptions
I will investigate.
As for test_lp1199361, that one is a bit flaky on some hardware. I haven't
figured out why though, and it does seem to pass for me on my desktop and the
buildds.