summaryrefslogtreecommitdiffstats
path: root/tests/auto/integration
diff options
context:
space:
mode:
authorVaL Doroshchuk <valentyn.doroshchuk@qt.io>2017-09-26 11:36:39 +0200
committerVaL Doroshchuk <valentyn.doroshchuk@qt.io>2017-09-26 12:44:18 +0000
commit51b361faa703e157feaa0cfd79e7d473cb704811 (patch)
treebe5d3ac28758273ad44e72c0be5edcbfc21fde24 /tests/auto/integration
parent4566ef694b0e3b36069e1861bb5b142a865974da (diff)
Adjust timeouts for QSounds auto tests
These tests contains fixed timeouts which sometimes is not enough, causing the test to fail under heavy load. Since isFinished() doesn't actually tell if a device has started, the timeout might come too early, e.g., when the device is still waiting for data, or even before it has started. Change-Id: I8f2f8341b9fcf656d86d161203c7eb63e66acca5 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'tests/auto/integration')
-rw-r--r--tests/auto/integration/qsound/tst_qsound.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/auto/integration/qsound/tst_qsound.cpp b/tests/auto/integration/qsound/tst_qsound.cpp
index 729b0f086..9fcf79184 100644
--- a/tests/auto/integration/qsound/tst_qsound.cpp
+++ b/tests/auto/integration/qsound/tst_qsound.cpp
@@ -88,9 +88,7 @@ void tst_QSound::testLooping()
QVERIFY(!sound->isFinished());
// test.wav is about 200ms, wait until it has finished playing 5 times
- QTest::qWait(3000);
-
- QVERIFY(sound->isFinished());
+ QTRY_VERIFY(sound->isFinished());
QCOMPARE(sound->loopsRemaining(),0);
}
@@ -99,8 +97,7 @@ void tst_QSound::testPlay()
sound->setLoops(1);
sound->play();
QVERIFY(!sound->isFinished());
- QTest::qWait(1000);
- QVERIFY(sound->isFinished());
+ QTRY_VERIFY(sound->isFinished());
}
void tst_QSound::testStop()
@@ -110,8 +107,7 @@ void tst_QSound::testStop()
QVERIFY(!sound->isFinished());
QTest::qWait(1000);
sound->stop();
- QTest::qWait(1000);
- QVERIFY(sound->isFinished());
+ QTRY_VERIFY(sound->isFinished());
}
void tst_QSound::testStaticPlay()