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=691652d38964265f3a189d89b34f857dfe2c53cb;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 b4ea8c4e9..a6e097ee2 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