summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@qt.io>2016-07-29 14:34:03 +0200
committerYoann Lopes <yoann.lopes@qt.io>2016-08-04 12:24:10 +0000
commit7966aca38451ed9ef32ac0fb1b344cdbf22521bb (patch)
treed9241108a8f20e3c94899f2c8df7cc57f0d01c5f
parent5b9384336c696ed13db8b1077b847bce012c95ef (diff)
Give more time before timeout in some tst_QAudioInput tests
Change-Id: If2336e9c550ef8264d0853be83972a6170a9746b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
-rw-r--r--tests/auto/integration/qaudioinput/tst_qaudioinput.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/integration/qaudioinput/tst_qaudioinput.cpp b/tests/auto/integration/qaudioinput/tst_qaudioinput.cpp
index 24278784..a25c380d 100644
--- a/tests/auto/integration/qaudioinput/tst_qaudioinput.cpp
+++ b/tests/auto/integration/qaudioinput/tst_qaudioinput.cpp
@@ -644,7 +644,7 @@ void tst_QAudioInput::push()
QByteArray buffer(AUDIO_BUFFER, 0);
qint64 len = (audioFormat.sampleRate()*audioFormat.channelCount()*(audioFormat.sampleSize()/8)*2); // 2 seconds
while (totalBytesRead < len) {
- QTRY_VERIFY(audioInput.bytesReady() >= audioInput.periodSize());
+ QTRY_VERIFY_WITH_TIMEOUT(audioInput.bytesReady() >= audioInput.periodSize(), 10000);
qint64 bytesRead = feed->read(buffer.data(), audioInput.periodSize());
audioFile->write(buffer.constData(),bytesRead);
totalBytesRead+=bytesRead;
@@ -725,7 +725,7 @@ void tst_QAudioInput::pushSuspendResume()
QByteArray buffer(AUDIO_BUFFER, 0);
qint64 len = (audioFormat.sampleRate()*audioFormat.channelCount()*(audioFormat.sampleSize()/8)); // 1 seconds
while (totalBytesRead < len) {
- QTRY_VERIFY(audioInput.bytesReady() >= audioInput.periodSize());
+ QTRY_VERIFY_WITH_TIMEOUT(audioInput.bytesReady() >= audioInput.periodSize(), 10000);
qint64 bytesRead = feed->read(buffer.data(), audioInput.periodSize());
audioFile->write(buffer.constData(),bytesRead);
totalBytesRead+=bytesRead;
@@ -780,7 +780,7 @@ void tst_QAudioInput::pushSuspendResume()
totalBytesRead = 0;
firstBuffer = true;
while (totalBytesRead < len && audioInput.state() != QAudio::StoppedState) {
- QTRY_VERIFY(audioInput.bytesReady() >= audioInput.periodSize());
+ QTRY_VERIFY_WITH_TIMEOUT(audioInput.bytesReady() >= audioInput.periodSize(), 10000);
qint64 bytesRead = feed->read(buffer.data(), audioInput.periodSize());
audioFile->write(buffer.constData(),bytesRead);
totalBytesRead+=bytesRead;
@@ -827,7 +827,7 @@ void tst_QAudioInput::reset()
QVERIFY2((audioInput.state() == QAudio::IdleState), "didn't transition to IdleState after start()");
QVERIFY2((audioInput.error() == QAudio::NoError), "error state is not equal to QAudio::NoError after start()");
QVERIFY(audioInput.periodSize() > 0);
- QTRY_VERIFY2((audioInput.bytesReady() > audioInput.periodSize()), "no bytes available after starting");
+ QTRY_VERIFY2_WITH_TIMEOUT((audioInput.bytesReady() > audioInput.periodSize()), "no bytes available after starting", 10000);
// Trigger a read
QByteArray data = device->read(audioInput.periodSize());