[Bluetooth][Non-ACR][Correct PASS condition for LE Scan] 37/238137/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 9 Jul 2020 01:34:12 +0000 (10:34 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 9 Jul 2020 01:34:12 +0000 (10:34 +0900)
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

tct-suite-vs/Tizen.Bluetooth.Tests/testcase/TSBluetoothAdapter.cs

index b4ea8c4..a6e097e 100644 (file)
@@ -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