[autotests] Avoid useless waits in testToplevelOpenCloseAnimation
ClosedPublic

Authored by zzag on Jan 5 2019, 3:34 PM.

Details

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

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zzag created this revision.Jan 5 2019, 3:34 PM
Restricted Application added a project: KWin. · View Herald TranscriptJan 5 2019, 3:34 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Jan 5 2019, 3:34 PM
davidedmundson accepted this revision.Jan 5 2019, 3:43 PM
davidedmundson added a subscriber: davidedmundson.

Good idea

autotests/integration/effects/toplevel_open_close_animation_test.cpp
139

There's a QTRY_VERIFY_WITH_TIMEOUT which would allow us to keep the check that everything lasted < 1s.

This revision is now accepted and ready to land.Jan 5 2019, 3:43 PM
zzag added inline comments.Jan 5 2019, 4:31 PM
autotests/integration/effects/toplevel_open_close_animation_test.cpp
139

1s was a semi-arbitrary choice.

Given that CI can sometimes be under heavy load, I think that's fine to have 5s timeout. :-)

This revision was automatically updated to reflect the committed changes.