on xenial help sign in
Remerge lp:~mterry/unity8/cleanup-greeter-dbus-test
commit5c12379aab2e29db5287d18c62e350e82f333b7a authorMichał Sawicz <michal.sawicz@canonical.com> dateThu 8 Jan 2015, 14:36 (12 years ago) parente329c013bec098
1 file changed+5−2
tests/plugins/LightDM/dbus.cpp+5−2
tests/plugins/LightDM/dbus.cpp+5−2
@@ -163,10 +163,13 @@ private Q_SLOTS:
163163 QSignalSpy spy(this, SIGNAL(PropertiesChangedRelay(QString, QVariantMap, QStringList)));
164164 greeter->authenticate("no-password");
165165
166− // once for user, once for locked; second will be for locked mode
167− while (spy.count() != 2) {
166+ // Two property changed signals will be emitted, one for the IsLocked
167+ // property, one for the ActiveEntry; the first will be IsLocked.
168+ spy.wait();
169+ if (spy.count() < 2) {
168170 spy.wait();
169171 }
172+ QCOMPARE(spy.count(), 2);
170173
171174 QList<QVariant> arguments = spy.takeLast();
172175 QVERIFY(arguments.at(0).toString() == "com.canonical.UnityGreeter.List");