summaryrefslogtreecommitdiffstats
path: root/tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp')
-rw-r--r--tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp b/tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp
index fbbd9c73..ca1f2b67 100644
--- a/tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp
+++ b/tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp
@@ -605,9 +605,6 @@ void tst_QAudioOutput::pullSuspendResume()
audioOutput.resume();
- // Give backends running in separate threads a chance to suspend.
- QTest::qWait(100);
-
// Check that QAudioOutput immediately transitions to ActiveState
QVERIFY2((stateSignal.count() == 1),
QString("didn't emit signal after resume(), got %1 signals instead").arg(stateSignal.count()).toLocal8Bit().constData());
@@ -619,8 +616,8 @@ void tst_QAudioOutput::pullSuspendResume()
QTest::qWait(3000); // 3 seconds should be plenty
QVERIFY2(audioFile->atEnd(), "didn't play to EOF");
- QVERIFY2((stateSignal.count() == 1),
- QString("didn't emit IdleState signal when at EOF, got %1 signals instead").arg(stateSignal.count()).toLocal8Bit().constData());
+ QVERIFY(stateSignal.count() > 0);
+ QCOMPARE(qvariant_cast<QAudio::State>(stateSignal.last().at(0)), QAudio::IdleState);
QVERIFY2((audioOutput.state() == QAudio::IdleState), "didn't transitions to IdleState when at EOF");
stateSignal.clear();