autotests: don't fail if an unrelated window shows up.

Summary:
Running anything else in parallel to this test would make it fail,
because windowAdded() would be emitted with an unrelated window.
If we couldn't find our dialog when the signal is emitted,
just keep waiting for the signal to be emitted again.

Test Plan: ctest -j 8 .

Reviewers: hein, drosca, broulik, davidedmundson, jtamate

Reviewed By: jtamate

Subscribers: jtamate, kde-frameworks-devel, #plasma

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D14724
This commit is contained in:
David Faure 2018-08-10 12:07:23 +02:00
parent 978160d9d9
commit 89724dbd8c

View File

@ -53,6 +53,9 @@ void DialogStateTest::windowState()
windowAdded = true;
break;
}
if (windowAddedSpy.isEmpty()) {
QVERIFY(windowAddedSpy.wait());
}
}
QVERIFY(windowAdded);