From: DoHyun Pyun Date: Thu, 9 Jul 2020 01:34:12 +0000 (+0900) Subject: [Bluetooth][Non-ACR][Correct PASS condition for LE Scan] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F37%2F238137%2F1;p=test%2Ftct%2Fcsharp%2Fapi.git [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 --- 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