From 83dca5b524fb897ac8a7bb0d6c8b3fa1b0404fd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 29 Jun 2016 12:38:02 +0200 Subject: [PATCH] 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. --- autotests/integration/xclipboardsync_test.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autotests/integration/xclipboardsync_test.cpp b/autotests/integration/xclipboardsync_test.cpp index de2fcc52d0..34e7929db1 100644 --- a/autotests/integration/xclipboardsync_test.cpp +++ b/autotests/integration/xclipboardsync_test.cpp @@ -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());