[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
icc-effect-5.17.5
Roman Gilg 2019-06-27 18:52:06 +02:00
parent 349560a78c
commit bc309929a0
1 changed files with 2 additions and 3 deletions

View File

@ -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<QModelIndex>(), internalTopLevelIndex);
QModelIndex clientIndex = model.index(rowsInsertedSpy.first().last().toInt(), 0, internalTopLevelIndex);