[Bug 37381] New: client-types.py appears to have a race

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu May 19 19:39:27 CEST 2011


https://bugs.freedesktop.org/show_bug.cgi?id=37381

           Summary: client-types.py appears to have a race
           Product: Telepathy
           Version: git master
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: gabble
        AssignedTo: telepathy-bugs at lists.freedesktop.org
        ReportedBy: will.thompson at collabora.co.uk
         QAContact: telepathy-bugs at lists.freedesktop.org


Today I pushed a trivial patch to a test to Gabble, and the tests failed on 3
out of the 4 build slaves. Two of them were races, but one of them was a
genuine failure
<http://buildbot.telepathy.im/builders/Gabble%20-%20plugins%20-%20amd64/builds/52>:

Traceback (most recent call last):
  File
"/var/lib/buildbot/telepathy/gabble-plugins-amd64/build/tests/twisted/gabbletest.py",
line 627, in exec_test_deferred
    fun(queue, bus, conns[0], streams[0])
  File "./client-types.py", line 218, in test2
    assertSameSets(['pc'], types[handle])
KeyError: dbus.UInt32(2L)
FAIL: client-types.py

`tt -r client-types.py` reproduced the issue pretty quickly. It looks like a
pretty straight race: contact_online() sends a disco reply but doesn't actually
wait around to check that Gabble's actually received it, and immediately
afterwards the test asks for handle's client types. So I threw a sync_stream()
into the 'not initial' branch of contact_online(). But that still seemed to be
racy:

Traceback (most recent call last):
  File "/home/wjt/src/tp/gabble/tests/twisted/gabbletest.py", line 627, in
exec_test_deferred
    fun(queue, bus, conns[0], streams[0])
  File "./client-types.py", line 221, in test2
    assertSameSets(['pc'], types[handle])
  File "/home/wjt/src/tp/gabble/tests/twisted/servicetest.py", line 565, in
assertSameSets
    pretty(exp_set), pretty(val_set)))
AssertionError: expected contents:
set(['pc'])
got:
set([dbus.String(u'phone')])
FAIL: client-types.py

so then I gave up.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.



More information about the telepathy-bugs mailing list