From bc309929a00edb98210c81e2844129c2669977fc Mon Sep 17 00:00:00 2001 From: Roman Gilg Date: Thu, 27 Jun 2019 18:52:06 +0200 Subject: [PATCH] [autotests] Fix debug console test Summary: Use QTRY_COMPARE macro to not fail if signal already sent. Also shorten timeout on expect to fail test for faster test runs. Test Plan: Debug console test passes again. Reviewers: #kwin, zzag Reviewed By: #kwin, zzag Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D22124 --- autotests/integration/debug_console_test.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/autotests/integration/debug_console_test.cpp b/autotests/integration/debug_console_test.cpp index 399b6d0fba..6dedca6973 100644 --- a/autotests/integration/debug_console_test.cpp +++ b/autotests/integration/debug_console_test.cpp @@ -392,7 +392,7 @@ void DebugConsoleTest::testWaylandClient() Test::flushWaylandConnection(); qDebug() << rowsRemovedSpy.count(); QEXPECT_FAIL("wlShell", "Deleting a ShellSurface does not result in the server removing the ShellClient", Continue); - QVERIFY(rowsRemovedSpy.wait()); + QVERIFY(rowsRemovedSpy.wait(500)); surface.reset(); if (rowsRemovedSpy.isEmpty()) { @@ -449,8 +449,7 @@ void DebugConsoleTest::testInternalWindow() w->setGeometry(0, 0, 100, 100); w->show(); - QVERIFY(rowsInsertedSpy.wait()); - QCOMPARE(rowsInsertedSpy.count(), 1); + QTRY_COMPARE(rowsInsertedSpy.count(), 1); QCOMPARE(rowsInsertedSpy.first().first().value(), internalTopLevelIndex); QModelIndex clientIndex = model.index(rowsInsertedSpy.first().last().toInt(), 0, internalTopLevelIndex);