diff options
author | Michael BrĂ¼ning <michael.bruning@qt.io> | 2016-09-08 12:53:19 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2016-10-02 08:40:08 +0000 |
commit | 1a0e71b130f55a3ce77c6b27ac898355253f1b9a (patch) | |
tree | 5f47be54fa627b67476994fadb5d00fa187e75cb /tests/auto | |
parent | 142000b8b05ed5acb40231e0d9f027827c13175a (diff) |
Fix flaky tst_QQuickWebEngineView::printToPdf test by using QTRY_VERIFY
Task-number: QTBUG-55857
Change-Id: Ieb7fe836e7b03bea28dd97bcad343708a5be2cb5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp index 078e70255..28c94a6e8 100644 --- a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp +++ b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp @@ -505,8 +505,7 @@ void tst_QQuickWebEngineView::printToPdf() QString path = tempDir.path() + "/print_success.pdf"; view->printToPdf(path, QQuickWebEngineView::A4, QQuickWebEngineView::Portrait); - QTest::qWait(500); - QVERIFY(QFile::exists(path)); + QTRY_VERIFY(QFile::exists(path)); #if !defined(Q_OS_WIN) path = tempDir.path() + "/print_//fail.pdf"; @@ -514,8 +513,7 @@ void tst_QQuickWebEngineView::printToPdf() path = tempDir.path() + "/print_|fail.pdf"; #endif // #if !defined(Q_OS_WIN) view->printToPdf(path, QQuickWebEngineView::A4, QQuickWebEngineView::Portrait); - QTest::qWait(500); - QVERIFY(!QFile::exists(path)); + QTRY_VERIFY(!QFile::exists(path)); } void tst_QQuickWebEngineView::stopSettingFocusWhenDisabled() |