summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2019-06-06 13:16:15 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2019-06-17 15:46:44 +0200
commiteb78e559661ac86715d7546d28a88160acb8ec30 (patch)
tree463013497b7b738988cceacd425591ff25c09246 /tests
parentbbd5a988592e31b5f8ec0a111e7fea30c222f0ec (diff)
tst_qlowenergycontroller: fix concurrent discovery test
It was not taking care of the CoreBluetooth's inability to work with addresses. Otherwise, the same code path as Android/WinRT must be used (two connections are possible). Fixes: QTBUG-76203 Change-Id: I523130b916f7e8163f2a4a23617a0076216add80 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp
index 8ffc0480..ab393210 100644
--- a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp
+++ b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp
@@ -451,14 +451,18 @@ void tst_QLowEnergyController::tst_concurrentDiscovery()
// 2. new controller to same device fails
{
+#ifdef Q_OS_DARWIN
+ QLowEnergyController control2(remoteDeviceInfo);
+#else
QLowEnergyController control2(remoteDevice);
+#endif
control2.connectToDevice();
{
QTRY_IMPL(control2.state() != QLowEnergyController::ConnectingState,
30000);
}
-#if defined(Q_OS_ANDROID) || QT_CONFIG(winrt_bt)
+#if defined(Q_OS_ANDROID) || defined(Q_OS_DARWIN) || QT_CONFIG(winrt_bt)
QCOMPARE(control.state(), QLowEnergyController::ConnectedState);
QCOMPARE(control2.state(), QLowEnergyController::ConnectedState);
control2.disconnectFromDevice();