telepathy-gabble: remove request-group-{after,before}-roster.py

Guillaume Desmottes gdesmott at kemper.freedesktop.org
Fri Oct 4 03:59:17 PDT 2013


Module: telepathy-gabble
Branch: master
Commit: a52f69ccb7a55d0e9d7727952bc6518f33181c25
URL:    http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=a52f69ccb7a55d0e9d7727952bc6518f33181c25

Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Thu Oct  3 16:09:12 2013 +0200

remove request-group-{after,before}-roster.py

They are testing the old group API.

---

 tests/twisted/Makefile.am                          |    2 -
 tests/twisted/roster/request-group-after-roster.py |   46 -------------------
 .../twisted/roster/request-group-before-roster.py  |   48 --------------------
 3 files changed, 0 insertions(+), 96 deletions(-)

diff --git a/tests/twisted/Makefile.am b/tests/twisted/Makefile.am
index 94895db..daf1b85 100644
--- a/tests/twisted/Makefile.am
+++ b/tests/twisted/Makefile.am
@@ -83,8 +83,6 @@ TWISTED_TESTS = \
 	roster/push-from-contact.py \
 	roster/push-without-id.py \
 	roster/removed-from-rp-subscribe.py \
-	roster/request-group-after-roster.py \
-	roster/request-group-before-roster.py \
 	roster/test-google-roster.py \
 	roster/test-roster-item-deletion.py \
 	roster/test-roster.py \
diff --git a/tests/twisted/roster/request-group-after-roster.py b/tests/twisted/roster/request-group-after-roster.py
deleted file mode 100644
index 2d56919..0000000
--- a/tests/twisted/roster/request-group-after-roster.py
+++ /dev/null
@@ -1,46 +0,0 @@
-"""
-Regression test for a bug where CreateChannel times out when requesting a group
-channel after the roster has been received.
-"""
-
-from gabbletest import exec_test, sync_stream
-from servicetest import sync_dbus, call_async
-import constants as cs
-import ns
-
-def test(q, bus, conn, stream):
-    roster_event = q.expect('stream-iq', query_ns=ns.ROSTER)
-    roster_event.stanza['type'] = 'result'
-
-    call_async(q, conn, "RequestHandles", cs.HT_GROUP, ['test'])
-
-    event = q.expect('dbus-return', method='RequestHandles')
-    test_handle = event.value[0][0]
-
-    # send an empty roster
-    stream.send(roster_event.stanza)
-
-    sync_stream(q, stream)
-    sync_dbus(bus, q, conn)
-
-    call_async(q, conn.Requests, 'CreateChannel',
-            { cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_CONTACT_LIST,
-              cs.TARGET_HANDLE_TYPE: cs.HT_GROUP,
-              cs.TARGET_HANDLE: test_handle,
-              })
-
-    event = q.expect('dbus-return', method='CreateChannel')
-    ret_path, ret_props = event.value
-
-    event = q.expect('dbus-signal', signal='NewChannels')
-    path, props = event.args[0][0]
-    assert props[cs.CHANNEL_TYPE] == cs.CHANNEL_TYPE_CONTACT_LIST, props
-    assert props[cs.TARGET_HANDLE_TYPE] == cs.HT_GROUP, props
-    assert props[cs.TARGET_HANDLE] == test_handle, props
-    assert props[cs.TARGET_ID] == 'test', props
-
-    assert ret_path == path, (ret_path, path)
-    assert ret_props == props, (ret_props, props)
-
-if __name__ == '__main__':
-    exec_test(test)
diff --git a/tests/twisted/roster/request-group-before-roster.py b/tests/twisted/roster/request-group-before-roster.py
deleted file mode 100644
index 0a736b2..0000000
--- a/tests/twisted/roster/request-group-before-roster.py
+++ /dev/null
@@ -1,48 +0,0 @@
-"""
-Regression test for a bug where RequestChannel times out when requesting a
-group channel if the roster hasn't been received at the time of the call.
-"""
-
-from gabbletest import exec_test, sync_stream
-from servicetest import sync_dbus, call_async
-import constants as cs
-import ns
-
-def test(q, bus, conn, stream):
-    roster_event = q.expect('stream-iq', query_ns=ns.ROSTER)
-    roster_event.stanza['type'] = 'result'
-
-    call_async(q, conn, "RequestHandles", cs.HT_GROUP, ['test'])
-
-    event = q.expect('dbus-return', method='RequestHandles')
-    test_handle = event.value[0][0]
-
-    call_async(q, conn, 'RequestChannel', cs.CHANNEL_TYPE_CONTACT_LIST,
-        cs.HT_GROUP, test_handle, True)
-
-    # A previous incarnation of this test --- written with the intention that
-    # RequestChannel would be called before the roster was received, to expose
-    # a bug in Gabble triggered by that ordering --- was racy: if the D-Bus
-    # daemon happened to be particularly busy, the call to RequestChannel
-    # reached Gabble after the roster stanza. (The race was discovered when
-    # that reversed order triggered a newly-introduced instance of the
-    # opposite bug to the one the test was targetting!) So we sync the XMPP
-    # stream and D-Bus queue here.
-    sync_stream(q, stream)
-    sync_dbus(bus, q, conn)
-
-    # send an empty roster
-    stream.send(roster_event.stanza)
-
-    event = q.expect('dbus-return', method='RequestChannel')
-    path = event.value[0]
-
-    while True:
-        event = q.expect('dbus-signal', signal='NewChannel')
-        assert event.args[0] == path, (event.args, path)
-        _, type, handle_type, handle, suppress_handler = event.args
-        if handle_type == cs.HT_GROUP and handle == test_handle:
-            break
-
-if __name__ == '__main__':
-    exec_test(test)



More information about the telepathy-commits mailing list