From 691652d38964265f3a189d89b34f857dfe2c53cb Mon Sep 17 00:00:00 2001 From: DoHyun Pyun Date: Thu, 9 Jul 2020 10:34:12 +0900 Subject: [PATCH] [Bluetooth][Non-ACR][Correct PASS condition for LE Scan] If there is no BLE device around, the scan result callback will not be invoked after calling StartLeScan API. So we should not handle this senario as TCT fail. Change-Id: I17b318262618aed6467337e92ad56e2f4c1e6b63 --- .../Tizen.Bluetooth.Tests/testcase/TSBluetoothAdapter.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tct-suite-vs/Tizen.Bluetooth.Tests/testcase/TSBluetoothAdapter.cs b/tct-suite-vs/Tizen.Bluetooth.Tests/testcase/TSBluetoothAdapter.cs index b4ea8c4..a6e097e 100644 --- a/tct-suite-vs/Tizen.Bluetooth.Tests/testcase/TSBluetoothAdapter.cs +++ b/tct-suite-vs/Tizen.Bluetooth.Tests/testcase/TSBluetoothAdapter.cs @@ -752,19 +752,28 @@ namespace Tizen.Network.Bluetooth.Tests BluetoothAdapter.StartLeScan(BluetoothLeScanMode.Balanced); _flagDiscovery = false; await waitDiscoveryFlag(); - Assert.IsTrue(_flagDiscovery, "ScanResultChanged event is not getting called"); + + if (_flagDiscovery == false) + LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "There is no LE device around"); + BluetoothAdapter.StopLeScan(); BluetoothAdapter.StartLeScan(BluetoothLeScanMode.LowLatency); _flagDiscovery = false; await waitDiscoveryFlag(); - Assert.IsTrue(_flagDiscovery, "ScanResultChanged event is not getting called"); + + if (_flagDiscovery == false) + LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "There is no LE device around"); + BluetoothAdapter.StopLeScan(); BluetoothAdapter.StartLeScan(BluetoothLeScanMode.LowEnergy); _flagDiscovery = false; await waitDiscoveryFlag(); - Assert.IsTrue(_flagDiscovery, "ScanResultChanged event is not getting called"); + + if (_flagDiscovery == false) + LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "There is no LE device around"); + BluetoothAdapter.StopLeScan(); /* POSTCONDITION -- 2.7.4