aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-04-26 14:08:52 +0200
committerLiang Qi <liang.qi@qt.io>2018-04-27 08:34:27 +0000
commit8f031fe77673a023c0a9d6ed38eca2d06267f259 (patch)
tree4d404487605683f7bf695dbc6fb75f54f60037b7 /tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
parent5ce6e53184c413f9fce37b9bc462eb7203d915da (diff)
test: fix flaky in tst_QQuickPathView::movementDirection()
Due to heavy load in ci test vm, the animation perhaps didn't start after QTest::qWait(100). Task-number: QTBUG-67939 Change-Id: I8c786c82ea41c3d3514ab6bddaefb0c584f35fe0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/quick/qquickpathview/tst_qquickpathview.cpp')
-rw-r--r--tests/auto/quick/qquickpathview/tst_qquickpathview.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
index 5f7f35b5d7..4211d08393 100644
--- a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
+++ b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
@@ -2462,9 +2462,11 @@ static void verify_offsets(QQuickPathView *pathview, int toidx, qreal fromoffset
QTest::qWait(100);
first = pathview->offset();
while (1) {
+ if (first == 0)
+ first = pathview->offset();
QTest::qWait(10); // highlightMoveDuration: 1000
second = pathview->offset();
- if (!started && second != first) { // animation started
+ if (!started && first != 0 && second != first) { // animation started
started = true;
break;
}