From 091da38e7b51f09345c2cf18b63c96fcef826683 Mon Sep 17 00:00:00 2001 From: Andreas Buhr Date: Tue, 9 Mar 2021 12:24:21 +0100 Subject: [PATCH] Fix unit tests: Set timeout long enough Unit tests wait for BlueZ to come back after at most 20 seconds. On Andreas' machine, BlueZ scans for about 25 seconds, causing tests to fail. This patch increses the timeout to 26.5 seconds. Change-Id: I4cabc6a20231cb7d148660b2d951ba77b32c0a2f Reviewed-by: Alex Blasche --- .../qlowenergycharacteristic/tst_qlowenergycharacteristic.cpp | 2 +- tests/auto/qlowenergydescriptor/tst_qlowenergydescriptor.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/qlowenergycharacteristic/tst_qlowenergycharacteristic.cpp b/tests/auto/qlowenergycharacteristic/tst_qlowenergycharacteristic.cpp index d4e6b9b5..39f86113 100644 --- a/tests/auto/qlowenergycharacteristic/tst_qlowenergycharacteristic.cpp +++ b/tests/auto/qlowenergycharacteristic/tst_qlowenergycharacteristic.cpp @@ -120,7 +120,7 @@ void tst_QLowEnergyCharacteristic::initTestCase() << remoteDevice.address() << remoteDevice.deviceUuid(); controller->connectToDevice(); QTRY_IMPL(controller->state() != QLowEnergyController::ConnectingState, - 20000); + 26500); if (controller->state() != QLowEnergyController::ConnectedState) { // any error and we skip delete controller; diff --git a/tests/auto/qlowenergydescriptor/tst_qlowenergydescriptor.cpp b/tests/auto/qlowenergydescriptor/tst_qlowenergydescriptor.cpp index ff7d185f..9d0907b6 100644 --- a/tests/auto/qlowenergydescriptor/tst_qlowenergydescriptor.cpp +++ b/tests/auto/qlowenergydescriptor/tst_qlowenergydescriptor.cpp @@ -110,7 +110,7 @@ void tst_QLowEnergyDescriptor::initTestCase() qDebug() << "Connecting to" << remoteDeviceInfo.address(); controller->connectToDevice(); QTRY_IMPL(controller->state() != QLowEnergyController::ConnectingState, - 20000) + 26500) if (controller->state() != QLowEnergyController::ConnectedState) { // any error and we skip delete controller;