[autotests] Avoid useless waits in testToplevelOpenCloseAnimation
Summary: Use QTRY_VERIFY instead of qWait + QVERIFY to avoid useless waits. Effects like scale or glide don't last longer than 200ms. Test Plan: Before: $ dbus-run-session ctest -R testToplevelOpenCloseAnimation Test project /home/vlad/Workspace/KDE/build/kde/workspace/kwin Start 123: kwin-testToplevelOpenCloseAnimation 1/2 Test #123: kwin-testToplevelOpenCloseAnimation ............... Passed 6.43 sec Start 124: kwin-testToplevelOpenCloseAnimation-waylandonly 2/2 Test #124: kwin-testToplevelOpenCloseAnimation-waylandonly ... Passed 6.33 sec 100% tests passed, 0 tests failed out of 2 Total Test time (real) = 12.76 sec After: $ dbus-run-session ctest -R testToplevelOpenCloseAnimation Test project /home/vlad/Workspace/KDE/build/kde/workspace/kwin Start 123: kwin-testToplevelOpenCloseAnimation 1/2 Test #123: kwin-testToplevelOpenCloseAnimation ............... Passed 2.05 sec Start 124: kwin-testToplevelOpenCloseAnimation-waylandonly 2/2 Test #124: kwin-testToplevelOpenCloseAnimation-waylandonly ... Passed 2.00 sec 100% tests passed, 0 tests failed out of 2 Total Test time (real) = 4.05 sec Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: davidedmundson, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D17989
This commit is contained in:
parent
6b3e55d6f5
commit
72b9a75cd7
1 changed files with 4 additions and 8 deletions
|
@ -135,10 +135,8 @@ void ToplevelOpenCloseAnimationTest::testAnimateToplevels()
|
|||
QVERIFY(client);
|
||||
QVERIFY(effect->isActive());
|
||||
|
||||
// None of effects lasts longer than 1000ms, so after that duration the effect
|
||||
// should not be active anymore, i.e. the animation is complete.
|
||||
QTest::qWait(1000);
|
||||
QVERIFY(!effect->isActive());
|
||||
// Eventually, the animation will be complete.
|
||||
QTRY_VERIFY(!effect->isActive());
|
||||
|
||||
// Close the test client, the effect should start animating the disappearing
|
||||
// of the client.
|
||||
|
@ -149,10 +147,8 @@ void ToplevelOpenCloseAnimationTest::testAnimateToplevels()
|
|||
QVERIFY(windowClosedSpy.wait());
|
||||
QVERIFY(effect->isActive());
|
||||
|
||||
// None of effects lasts longer than 1000ms, so after that duration the effect
|
||||
// should not be active anymore, i.e. the animation is complete.
|
||||
QTest::qWait(1000);
|
||||
QVERIFY(!effect->isActive());
|
||||
// Eventually, the animation will be complete.
|
||||
QTRY_VERIFY(!effect->isActive());
|
||||
}
|
||||
|
||||
void ToplevelOpenCloseAnimationTest::testDontAnimatePopups_data()
|
||||
|
|
Loading…
Reference in a new issue