diff options
author | Olli Salli <ollisal@gmail.com> | 2011-01-03 12:53:24 +0200 |
---|---|---|
committer | Olli Salli <ollisal@gmail.com> | 2011-01-03 12:53:36 +0200 |
commit | e805895e3dd77dc92ebf83295e44d60c78d6ca21 (patch) | |
tree | 82fa8fac5fd1144b7f41112503b25c144394f456 | |
parent | 8c0776411f2465fce1c97db75685b1947b353635 (diff) | |
parent | 4ce8ec6db65b62e0b73655a70010a8e87f2a07b4 (diff) |
Merge branch 'roster-race'
Reviewed-by: Andre Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>
-rw-r--r-- | tests/dbus/conn-roster-groups.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/tests/dbus/conn-roster-groups.cpp b/tests/dbus/conn-roster-groups.cpp index 99631361..e8527967 100644 --- a/tests/dbus/conn-roster-groups.cpp +++ b/tests/dbus/conn-roster-groups.cpp @@ -361,6 +361,12 @@ void TestConnRosterGroups::testNotADeathTrap() QVERIFY(mContact->subscriptionState() != Contact::PresenceStateNo); + // Bah... The test CM fails to cancel its "accept auth request" synthesized event even if we + // cancel the subscription request, and that event may screw up the rest of the test. So, wait + // for the event here. + while (mContact->subscriptionState() != Contact::PresenceStateYes) + mLoop->processEvents(); + QVERIFY(connect(mConn->contactManager()->removePresenceSubscription( QList<ContactPtr>() << mContact, QLatin1String("Please don't fail")), @@ -443,6 +449,12 @@ void TestConnRosterGroups::testNotADeathTrap() QVERIFY(mContact->subscriptionState() != Contact::PresenceStateNo); + // Bah... The test CM fails to cancel its "accept auth request" synthesized event even if we + // cancel the subscription request, and that event may screw up the rest of the test. So, wait + // for the event here. + while (mContact->subscriptionState() != Contact::PresenceStateYes) + mLoop->processEvents(); + QVERIFY(connect(mConn->contactManager()->removePresenceSubscription( QList<ContactPtr>() << mContact, QLatin1String("Please don't fail")), @@ -471,15 +483,6 @@ void TestConnRosterGroups::testNotADeathTrap() SLOT(expectSuccessfulCall(Tp::PendingOperation*)))); QCOMPARE(mLoop->exec(), 0); - qDebug() << "waiting for group to be added"; - - // FIXME: Remove this once fd.o #29728 is fixed - while (!mConn->contactManager()->allKnownGroups().contains(QLatin1String("My successful entourage"))) { - mLoop->processEvents(); - } - - qDebug() << "group has been added"; - QVERIFY(connect(mConn->contactManager()->addContactsToGroup(QLatin1String("My successful entourage"), QList<ContactPtr>() << mContact), SIGNAL(finished(Tp::PendingOperation*)), |