summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@theqtcompany.com>2015-10-31 21:51:36 +0100
committerYoann Lopes <yoann.lopes@theqtcompany.com>2015-12-18 19:08:20 +0000
commit2593f00411b09bcb5e157caa79a8f9d1283cad0b (patch)
treee392d997702add434c54c6a340cf1b552ee81996 /tests/auto
parent82e135167a5d24f600f006480b78a59511ae5cb3 (diff)
Make qmediaplayerbackend::seekPauseSeek test less flaky.
Change-Id: I05e4b9d392359bd84f9e932864a2e14275ef625f Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
index 916f70eff..261a316c7 100644
--- a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
+++ b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
@@ -720,7 +720,7 @@ void tst_QMediaPlayerBackend::seekPauseSeek()
player.pause();
QTRY_COMPARE(player.state(), QMediaPlayer::PausedState); // it might take some time for the operation to be completed
- QTRY_COMPARE(surface->m_frameList.size(), 1); // we must see a frame at position 7000 here
+ QTRY_VERIFY(!surface->m_frameList.isEmpty()); // we must see a frame at position 7000 here
{
QVideoFrame frame = surface->m_frameList.back();
@@ -739,12 +739,13 @@ void tst_QMediaPlayerBackend::seekPauseSeek()
frame.unmap();
}
+ surface->m_frameList.clear();
positionSpy.clear();
position = 12000;
player.setPosition(position);
QTRY_VERIFY(!positionSpy.isEmpty() && qAbs(player.position() - position) < (qint64)500);
QCOMPARE(player.state(), QMediaPlayer::PausedState);
- QCOMPARE(surface->m_frameList.size(), 2);
+ QVERIFY(!surface->m_frameList.isEmpty());
{
QVideoFrame frame = surface->m_frameList.back();