diff options
author | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2015-10-31 21:51:36 +0100 |
---|---|---|
committer | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2015-12-18 19:08:20 +0000 |
commit | 2593f00411b09bcb5e157caa79a8f9d1283cad0b (patch) | |
tree | e392d997702add434c54c6a340cf1b552ee81996 /tests | |
parent | 82e135167a5d24f600f006480b78a59511ae5cb3 (diff) | |
download | qtmultimedia-2593f00411b09bcb5e157caa79a8f9d1283cad0b.tar.gz |
Make qmediaplayerbackend::seekPauseSeek test less flaky.
Change-Id: I05e4b9d392359bd84f9e932864a2e14275ef625f
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp | 5 |
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(); |