Autopilot Eventually matcher gives an obscure message inside the Eventually matcher

Bug #1206805 reported by Thomi Richards on 2013-07-31
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Autopilot
High
Unassigned
autopilot (Ubuntu)
Undecided
Unassigned

Bug Description

The Eventually matcher calls into the DBus interface. If the DBus backend died, we print a stack trace, instead of raising a custom exception. The stack trace is:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/unity8/indicators_client/tests/test_battery.py", line 85, in test_auto_bright_switch
    self.assertThat(auto_brightness.checked, Eventually(NotEquals(old_ab_value)))
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 406, in assertThat
    mismatch = matcher.match(matchee)
  File "/usr/lib/python2.7/dist-packages/autopilot/matchers/__init__.py", line 109, in match
    wait_fun(self.matcher, self.timeout)
  File "/usr/lib/python2.7/dist-packages/autopilot/introspection/dbus.py", line 180, in wait_for
    _, new_state = self.parent.get_new_state()
  File "/usr/lib/python2.7/dist-packages/autopilot/introspection/dbus.py", line 490, in get_new_state
    return self.get_state_by_path(self.get_class_query_string())[0]
  File "/usr/lib/python2.7/dist-packages/autopilot/introspection/dbus.py", line 479, in get_state_by_path
    return cls._Backend.introspection_iface.GetState(piece)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 70, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)

We should catch this and raise a better exception instead.

Related branches

Julien Funk (jaboing) on 2015-06-01
Changed in autopilot:
importance: Critical → High
Changed in autopilot:
assignee: Thomi Richards (thomir) → nobody
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:autopilot at revision 558, scheduled for release in autopilot, milestone 1.4

Changed in autopilot:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers