diff options
author | Lars Knoll <lars.knoll@qt.io> | 2022-03-11 14:41:08 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2022-04-04 10:20:53 +0200 |
commit | b27d2c1fb1881ae5b17f3959acaa05c3593fd640 (patch) | |
tree | a34431be85197e223ff006d45786cb4c566eb276 /tests/auto/integration/qcamerabackend/tst_qcamerabackend.cpp | |
parent | a6eba3879a1a57848299cd40fcd7b84dd79cf8f1 (diff) |
Fix qcamerabackend test
Don't expect the stateChanged() signal to come asynchronously
when calling stop().
Change-Id: I213e84c20f4e8cf7a7c5563d2a336cb867851c76
Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
Diffstat (limited to 'tests/auto/integration/qcamerabackend/tst_qcamerabackend.cpp')
-rw-r--r-- | tests/auto/integration/qcamerabackend/tst_qcamerabackend.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/integration/qcamerabackend/tst_qcamerabackend.cpp b/tests/auto/integration/qcamerabackend/tst_qcamerabackend.cpp index 91cdcef3c..d348c87a0 100644 --- a/tests/auto/integration/qcamerabackend/tst_qcamerabackend.cpp +++ b/tests/auto/integration/qcamerabackend/tst_qcamerabackend.cpp @@ -597,9 +597,10 @@ void tst_QCameraBackend::testVideoRecording() QCOMPARE(recorder.metaData(), metaData); + recorderStateChanged.clear(); recorder.stop(); - QVERIFY(recorderStateChanged.wait(1000)); - QTRY_VERIFY(recorder.recorderState() == QMediaRecorder::StoppedState); + QTRY_VERIFY(recorderStateChanged.size() > 0); + QVERIFY(recorder.recorderState() == QMediaRecorder::StoppedState); QVERIFY(errorSignal.isEmpty()); QVERIFY(recorderErrorSignal.isEmpty()); @@ -652,9 +653,10 @@ void tst_QCameraBackend::testNativeMetadata() QCOMPARE(recorder.metaData(), metaData); + recorderStateChanged.clear(); recorder.stop(); - QVERIFY(recorderStateChanged.wait(1000)); + QTRY_VERIFY(recorderStateChanged.size() > 0); QVERIFY(errorSignal.isEmpty()); QVERIFY(recorderErrorSignal.isEmpty()); |