diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-05-12 16:00:48 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-26 08:48:19 +0200 |
commit | 01047d81fa213886a0784ff2ef567c99136f6ac7 (patch) | |
tree | f8e5afe189be55cd9ce2ebb305d0f02474f7a23d /tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp | |
parent | 34028376b21cef3647b47a120fb51192552d71ca (diff) |
Bluez5: Fix unit test for QBluetoothServiceDiscoveryAgent
Change-Id: Ic26edc97ee685e847cf545b3eef5611cf69546dc
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Diffstat (limited to 'tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp')
-rw-r--r-- | tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp b/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp index 791bff8d..6aded142 100644 --- a/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp +++ b/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp @@ -391,7 +391,11 @@ void tst_QBluetoothServiceDiscoveryAgent::tst_serviceDiscovery() discoveryAgent.start(); - QVERIFY(discoveryAgent.isActive()); + /* + * Either we wait for discovery agent to run its course (e.g. Bluez 4) or + * we have an immediate result (e.g. Bluez 5) + */ + QVERIFY(discoveryAgent.isActive() || !finishedSpy.isEmpty()); // Wait for up to MaxScanTime for the scan to finish int scanTime = MaxScanTime; |