[Telepathy-commits] [telepathy-qt4/master] Use the new Test::processDBusQueue method in the contacts test
Olli Salli
olli.salli at collabora.co.uk
Thu Jan 29 11:14:06 PST 2009
---
tests/dbus/contacts.cpp | 14 ++------------
1 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/tests/dbus/contacts.cpp b/tests/dbus/contacts.cpp
index 5270cb8..bcb9cf7 100644
--- a/tests/dbus/contacts.cpp
+++ b/tests/dbus/contacts.cpp
@@ -209,20 +209,10 @@ void TestContacts::testForHandles()
QCOMPARE(mContacts[1]->id(), QString("bob"));
QCOMPARE(mContacts[2]->id(), QString("chris"));
- // Make the contacts go out of scope, triggering the release of their handles
+ // Make the contacts go out of scope, starting releasing their handles, and finish that
mContacts.clear();
mLoop->processEvents();
-
- // Make sure the service side has processed the release as well, by calling a method
- ConnectionInterfaceContactsInterface *interface =
- mConn->optionalInterface<ConnectionInterfaceContactsInterface>();
- QDBusPendingCallWatcher *watcher =
- new QDBusPendingCallWatcher(interface->GetContactAttributes(Telepathy::UIntList(),
- QStringList(), false));
- QVERIFY(connect(watcher,
- SIGNAL(finished(QDBusPendingCallWatcher *)),
- SLOT(expectSuccessfulCall(QDBusPendingCallWatcher *))));
- QCOMPARE(mLoop->exec(), 0);
+ processDBusQueue(mConn);
// Unref the handles we created service-side
tp_handle_unref(serviceRepo, handles[0]);
--
1.5.6.5
More information about the telepathy-commits
mailing list