From 8f031fe77673a023c0a9d6ed38eca2d06267f259 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Thu, 26 Apr 2018 14:08:52 +0200 Subject: 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 --- tests/auto/quick/qquickpathview/tst_qquickpathview.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3