Window close tests fails on BadWindow errors

Bug #1486518 reported by Marco Trevisan (Treviño)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Autopilot
In Progress
Medium
Marco Trevisan (Treviño)

Bug Description

Here's an example of test that might fail because of BadWindow errors at AP bamf level:

ERROR: unity.tests.test_panel.PanelWindowButtonsActionsTests.test_window_buttons_close_follows_fitts_law(Single Monitor,Global Menus)
----------------------------------------------------------------------
Empty attachments:
  /var/log/syslog
  unity-log

Traceback (most recent call last):
  File "/home/marco/unity/tests/autopilot/unity/tests/test_panel.py", line 672, in test_window_buttons_close_follows_fitts_law
    self.assertNoWindowOpenWithXid(win_xid)
  File "/home/marco/unity/tests/autopilot/unity/tests/test_panel.py", line 159, in assertNoWindowOpenWithXid
    self.assertThat(refresh_fn, Eventually(Equals([])))
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 431, in assertThat
    mismatch_error = self._matchHelper(matchee, matcher, message, verbose)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 481, in _matchHelper
    mismatch = matcher.match(matchee)
  File "/usr/lib/python2.7/dist-packages/autopilot/matchers/__init__.py", line 113, in match
    wait_fun(self.matcher, self.timeout)
  File "/usr/lib/python2.7/dist-packages/autopilot/matchers/__init__.py", line 132, in _callable_wait_for
    failure_msg = mismatch.describe()
  File "/usr/lib/python2.7/dist-packages/testtools/matchers/_basic.py", line 76, in describe
    right = repr(self.other)
  File "/usr/lib/python2.7/dist-packages/autopilot/process/_bamf.py", line 596, in __repr__
    self.title if self._x_win else '', self.x_id)
  File "/usr/lib/python2.7/dist-packages/autopilot/process/_bamf.py", line 487, in title
    return self._getProperty('_NET_WM_NAME')
  File "/usr/lib/python2.7/dist-packages/autopilot/process/_bamf.py", line 606, in _getProperty
    get_display().get_atom(_type), X.AnyPropertyType)
  File "/usr/lib/python2.7/dist-packages/Xlib/xobject/drawable.py", line 452, in get_full_property
    prop = self.get_property(property, type, 0, sizehint)
  File "/usr/lib/python2.7/dist-packages/Xlib/xobject/drawable.py", line 441, in get_property
    long_length = length)
  File "/usr/lib/python2.7/dist-packages/Xlib/protocol/rq.py", line 1478, in __init__
    self.reply()
  File "/usr/lib/python2.7/dist-packages/Xlib/protocol/rq.py", line 1498, in reply
    raise self._error
BadWindow: <class 'Xlib.error.BadWindow'>: code = 3, resource_id = Xlib.xobject.resource.Resource(0x04a00085), sequence_number = 4570, major_opcode = 20, minor_opcode = 0

Related branches

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.