summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2018-03-23 10:28:47 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2018-03-26 09:24:03 +0000
commit9832bfa89dfc613f12553517a2b004e7f2e2ded2 (patch)
treeed4b0b5f472cf972270f6e25f0c003fa79a2d16c /tests
parenteb907b29a6f9bb0a9f3879ee394fcd7bfde37b49 (diff)
Stabilize some autotests that involve actual Qt3D rendering
Don't ask. Waiting for 10 frames is apparently not enough since Qt3D tends to crash if we start tearing down before a certain point. (not sure what that point is) Change-Id: Ifbc08e84fe9f9ae182acbfcecc1bff28d909f7cc Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/surfaceviewer/tst_surfaceviewer.cpp16
-rw-r--r--tests/auto/widget/tst_widget.cpp2
2 files changed, 9 insertions, 9 deletions
diff --git a/tests/auto/surfaceviewer/tst_surfaceviewer.cpp b/tests/auto/surfaceviewer/tst_surfaceviewer.cpp
index 401130d..c7bec42 100644
--- a/tests/auto/surfaceviewer/tst_surfaceviewer.cpp
+++ b/tests/auto/surfaceviewer/tst_surfaceviewer.cpp
@@ -123,8 +123,8 @@ void tst_SurfaceViewer::testWindow()
QCOMPARE(errorSpy.count(), 0);
QCOMPARE(runningSpy.count(), 1);
- // wait for 10 frames at least
- QTRY_VERIFY(frameSpy.count() >= 10);
+ // wait for 60 frames at least
+ QTRY_VERIFY(frameSpy.count() >= 60);
QCOMPARE(viewer.presentation()->source(), source);
}
@@ -153,7 +153,7 @@ void tst_SurfaceViewer::testWindowWithReload()
QCOMPARE(errorSpy.count(), 0);
QCOMPARE(runningSpy.count(), 1);
- QTRY_VERIFY(frameSpy.count() >= 10);
+ QTRY_VERIFY(frameSpy.count() >= 60);
viewer.presentation()->reload();
@@ -161,7 +161,7 @@ void tst_SurfaceViewer::testWindowWithReload()
QCOMPARE(errorSpy.count(), 0);
QCOMPARE(viewer.presentation()->source(), source);
- QTRY_VERIFY(frameSpy.count() >= 20);
+ QTRY_VERIFY(frameSpy.count() >= 120);
}
void tst_SurfaceViewer::testCreateDestroy()
@@ -180,15 +180,15 @@ void tst_SurfaceViewer::testCreateDestroy()
w.resize(1024, 768);
w.show();
QVERIFY(QTest::qWaitForWindowExposed(&w));
- QTRY_VERIFY(frameSpy.count() >= 10);
+ QTRY_VERIFY(frameSpy.count() >= 60);
viewer.destroy();
QVERIFY(viewer.create(&w, w.context()));
- QTRY_VERIFY(frameSpy.count() >= 20);
+ QTRY_VERIFY(frameSpy.count() >= 120);
// now without destroy(), create() in itself should recreate as well
QVERIFY(viewer.create(&w, w.context()));
- QTRY_VERIFY(frameSpy.count() >= 30);
+ QTRY_VERIFY(frameSpy.count() >= 180);
}
void tst_SurfaceViewer::testGrab()
@@ -209,7 +209,7 @@ void tst_SurfaceViewer::testGrab()
w.show();
QVERIFY(QTest::qWaitForWindowExposed(&w));
- QTRY_VERIFY(frameSpy.count() >= 10);
+ QTRY_VERIFY(frameSpy.count() >= 60);
QImage fullImage = viewer.grab();
QCOMPARE(fullImage.size(), w.size() * w.devicePixelRatio());
// verify at least that the background is there
diff --git a/tests/auto/widget/tst_widget.cpp b/tests/auto/widget/tst_widget.cpp
index 4d62cbe..37df3bf 100644
--- a/tests/auto/widget/tst_widget.cpp
+++ b/tests/auto/widget/tst_widget.cpp
@@ -93,7 +93,7 @@ void tst_Widget::testSimple()
QCOMPARE(errorSpy.count(), 0);
w.setUpdateInterval(0);
- QTRY_VERIFY(frameSpy.count() >= 10);
+ QTRY_VERIFY(frameSpy.count() >= 60);
}
QTEST_MAIN(tst_Widget)