Properly wait for client activated in XClipboardSyncTest::testSync
Test was failing on build.kde.org, though passing locally. This change tries to make the test more robust to timing issues which makes it hopefully pass on build.kde.org again.
This commit is contained in:
parent
e91f34f925
commit
83dca5b524
1 changed files with 3 additions and 1 deletions
|
@ -166,9 +166,11 @@ void XClipboardSyncTest::testSync()
|
|||
QCOMPARE(clientAddedSpy.count(), 1);
|
||||
QCOMPARE(shellClientAddedSpy.count(), 1);
|
||||
QVERIFY(pasteClient);
|
||||
qDebug() << pasteClient;
|
||||
if (workspace()->activeClient() != pasteClient) {
|
||||
QSignalSpy clientActivatedSpy(workspace(), &Workspace::clientActivated);
|
||||
QVERIFY(clientActivatedSpy.isValid());
|
||||
workspace()->activateClient(pasteClient);
|
||||
QVERIFY(clientActivatedSpy.wait());
|
||||
}
|
||||
QTRY_COMPARE(workspace()->activeClient(), pasteClient);
|
||||
QVERIFY(finishedSpy.wait());
|
||||
|
|
Loading…
Reference in a new issue