From eb78e559661ac86715d7546d28a88160acb8ec30 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Thu, 6 Jun 2019 13:16:15 +0200 Subject: 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 --- tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(); -- cgit v1.2.3