[Bluetooth][Non-ACR] Add pre-condition logic in socket TCs 84/215384/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 7 Oct 2019 23:56:17 +0000 (08:56 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 7 Oct 2019 23:56:17 +0000 (08:56 +0900)
This patchset resolves TFDF-5922 issue on the emulator image

Change-Id: I39ccfbd849dd5b5e78650702b9570f30c70ef159

tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSIBluetoothClientSocket.cs
tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSIBluetoothServerSocket.cs
tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSSocketConnection.cs
tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSSocketConnectionStateChangedEventArgs.cs
tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSSocketData.cs
tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSSocketDataReceivedEventArgs.cs

index cbcbc9a9c8da8462a2e5cf0cd82804a11e2acc8c..33c0ef9043d9ffcefcf69f3def2d3fff317cd634 100755 (executable)
@@ -44,6 +44,14 @@ namespace Tizen.Network.Bluetooth.Tests
         public async Task Connect_SOCKET_CONNECTION_TEST()
         {
             try {
+                /* We can't occupy the precondition, if BT feature is not supported in Manual TC */
+                if (_isBluetoothSupported == false)
+                {
+                    BluetoothHelper.DisplayLabel("Connect_SOCKET_CONNECTION_TEST");
+                    await ManualTest.WaitForConfirm();
+                    return;
+                }
+
                 BluetoothSetup.CreateClientSocketUtil();
                 if (BluetoothSetup.Client == null)
                 {
@@ -104,6 +112,14 @@ namespace Tizen.Network.Bluetooth.Tests
         public async Task Disconnect_SOCKET_DISCONNECTION_TEST()
         {
             try {
+                /* We can't occupy the precondition, if BT feature is not supported in Manual TC */
+                if (_isBluetoothSupported == false)
+                {
+                    BluetoothHelper.DisplayLabel("Disconnect_SOCKET_DISCONNECTION_TEST");
+                    await ManualTest.WaitForConfirm();
+                    return;
+                }
+
                 BluetoothSetup.CreateClientSocketUtil();
                 if (BluetoothSetup.Client == null)
                 {
index 4843edcdeca3bfab697f111e9d94f305b7d7b475..a52a38bb2ce46e384ca24897c27a694173d47fff 100755 (executable)
@@ -46,6 +46,14 @@ namespace Tizen.Network.Bluetooth.Tests
         {
             try
             {
+                /* We can't occupy the precondition, if BT feature is not supported in Manual TC */
+                if (_isBluetoothSupported == false)
+                {
+                    BluetoothHelper.DisplayLabel("ConnectionStateChanged_EVENT");
+                    await ManualTest.WaitForConfirm();
+                    return;
+                }
+
                 BluetoothSetup.CreateClientSocketUtil();
                 if (BluetoothSetup.Client == null)
                 {
@@ -104,6 +112,14 @@ namespace Tizen.Network.Bluetooth.Tests
             {
                 int writtenLength;
 
+                /* We can't occupy the precondition, if BT feature is not supported in Manual TC */
+                if (_isBluetoothSupported == false)
+                {
+                    BluetoothHelper.DisplayLabel("SendData_SEND_DATA_TEST_SERVER");
+                    await ManualTest.WaitForConfirm();
+                    return;
+                }
+
                 BluetoothSetup.CreateServerSocketUtil();
                 await BluetoothSetup.AcceptSocketUtil();
                 await Task.Delay(2000);
@@ -156,6 +172,14 @@ namespace Tizen.Network.Bluetooth.Tests
             {
                 int writtenLength;
 
+                /* We can't occupy the precondition, if BT feature is not supported in Manual TC */
+                if (_isBluetoothSupported == false)
+                {
+                    BluetoothHelper.DisplayLabel("SendData_SEND_DATA_TEST_CLIENT");
+                    await ManualTest.WaitForConfirm();
+                    return;
+                }
+
                 BluetoothSetup.CreateClientSocketUtil();
                 if (BluetoothSetup.Client == null)
                 {
@@ -214,6 +238,14 @@ namespace Tizen.Network.Bluetooth.Tests
         {
             try
             {
+                /* We can't occupy the precondition, if BT feature is not supported in Manual TC */
+                if (_isBluetoothSupported == false)
+                {
+                    BluetoothHelper.DisplayLabel("DataReceived_SERVER_EVENT");
+                    await ManualTest.WaitForConfirm();
+                    return;
+                }
+
                 BluetoothSetup.CreateServerSocketUtil();
                 await BluetoothSetup.AcceptSocketUtil();
                 BluetoothSetup.Socket.DataReceived += (sender, args) =>
@@ -272,6 +304,14 @@ namespace Tizen.Network.Bluetooth.Tests
         {
             try
             {
+                /* We can't occupy the precondition, if BT feature is not supported in Manual TC */
+                if (_isBluetoothSupported == false)
+                {
+                    BluetoothHelper.DisplayLabel("DataReceived_CLIENT_EVENT");
+                    await ManualTest.WaitForConfirm();
+                    return;
+                }
+
                 BluetoothSetup.CreateClientSocketUtil();
                 if (BluetoothSetup.Client == null)
                 {
index 5f81d7f174c5fb2511be6a22e46beea057c34c3b..1a507c58ad45f5b30f4b07fcec4883a23910272c 100644 (file)
@@ -45,6 +45,14 @@ namespace Tizen.Network.Bluetooth.Tests
         {
             try
             {
+                /* We can't occupy the precondition, if BT feature is not supported in Manual TC */
+                if (_isBluetoothSupported == false)
+                {
+                    BluetoothHelper.DisplayLabel("SocketFd_READ_ONLY");
+                    await ManualTest.WaitForConfirm();
+                    return;
+                }
+
                 BluetoothSetup.CreateClientSocketUtil();
                 if (BluetoothSetup.Client == null)
                 {
@@ -106,6 +114,14 @@ namespace Tizen.Network.Bluetooth.Tests
         {
             try
             {
+                /* We can't occupy the precondition, if BT feature is not supported in Manual TC */
+                if (_isBluetoothSupported == false)
+                {
+                    BluetoothHelper.DisplayLabel("Address_READ_ONLY");
+                    await ManualTest.WaitForConfirm();
+                    return;
+                }
+
                 BluetoothSetup.CreateClientSocketUtil();
                 if (BluetoothSetup.Client == null)
                 {
@@ -168,6 +184,14 @@ namespace Tizen.Network.Bluetooth.Tests
         {
             try
             {
+                /* We can't occupy the precondition, if BT feature is not supported in Manual TC */
+                if (_isBluetoothSupported == false)
+                {
+                    BluetoothHelper.DisplayLabel("ServiceUuid_READ_ONLY");
+                    await ManualTest.WaitForConfirm();
+                    return;
+                }
+
                 BluetoothSetup.CreateClientSocketUtil();
                 if (BluetoothSetup.Client == null)
                 {
@@ -230,6 +254,14 @@ namespace Tizen.Network.Bluetooth.Tests
         {
             try
             {
+                /* We can't occupy the precondition, if BT feature is not supported in Manual TC */
+                if (_isBluetoothSupported == false)
+                {
+                    BluetoothHelper.DisplayLabel("Client_READ_ONLY");
+                    await ManualTest.WaitForConfirm();
+                    return;
+                }
+
                 BluetoothSetup.CreateClientSocketUtil();
                 if (BluetoothSetup.Client == null)
                 {
index 2b5f4dcae2dc5b35ddd5df1230f580591688c837..3acd30c6a1258efcb02a432e8a7ca0b620dd397f 100755 (executable)
@@ -45,6 +45,14 @@ namespace Tizen.Network.Bluetooth.Tests
         {
             try
             {
+                /* We can't occupy the precondition, if BT feature is not supported in Manual TC */
+                if (_isBluetoothSupported == false)
+                {
+                    BluetoothHelper.DisplayLabel("Connection_READ_ONLY");
+                    await ManualTest.WaitForConfirm();
+                    return;
+                }
+
                 BluetoothSetup.CreateClientSocketUtil();
                 if (BluetoothSetup.Client == null)
                 {
@@ -100,6 +108,14 @@ namespace Tizen.Network.Bluetooth.Tests
         {
             try
             {
+                /* We can't occupy the precondition, if BT feature is not supported in Manual TC */
+                if (_isBluetoothSupported == false)
+                {
+                    BluetoothHelper.DisplayLabel("Result_READ_ONLY");
+                    await ManualTest.WaitForConfirm();
+                    return;
+                }
+
                 BluetoothSetup.CreateClientSocketUtil();
                 if (BluetoothSetup.Client == null)
                 {
@@ -154,6 +170,14 @@ namespace Tizen.Network.Bluetooth.Tests
         {
             try
             {
+                /* We can't occupy the precondition, if BT feature is not supported in Manual TC */
+                if (_isBluetoothSupported == false)
+                {
+                    BluetoothHelper.DisplayLabel("State_READ_ONLY");
+                    await ManualTest.WaitForConfirm();
+                    return;
+                }
+
                 BluetoothSetup.CreateClientSocketUtil();
                 if (BluetoothSetup.Client == null)
                 {
index 63dd8c1870a4576dd88a890c82d914c4b8bb6ca9..1aa4a0064789a46f37bef5e6c2d8fd948057111c 100755 (executable)
@@ -69,6 +69,14 @@ namespace Tizen.Network.Bluetooth.Tests
         {
             try
             {
+                /* We can't occupy the precondition, if BT feature is not supported in Manual TC */
+                if (_isBluetoothSupported == false)
+                {
+                    BluetoothHelper.DisplayLabel("SocketFd_READ_ONLY");
+                    await ManualTest.WaitForConfirm();
+                    return;
+                }
+
                 BluetoothSetup.CreateClientSocketUtil();
                 if (BluetoothSetup.Client == null)
                 {
@@ -129,6 +137,14 @@ namespace Tizen.Network.Bluetooth.Tests
         {
             try
             {
+                /* We can't occupy the precondition, if BT feature is not supported in Manual TC */
+                if (_isBluetoothSupported == false)
+                {
+                    BluetoothHelper.DisplayLabel("DataSize_READ_ONLY");
+                    await ManualTest.WaitForConfirm();
+                    return;
+                }
+
                 BluetoothSetup.CreateClientSocketUtil();
                 if (BluetoothSetup.Client == null)
                 {
@@ -188,6 +204,14 @@ namespace Tizen.Network.Bluetooth.Tests
         {
             try
             {
+                /* We can't occupy the precondition, if BT feature is not supported in Manual TC */
+                if (_isBluetoothSupported == false)
+                {
+                    BluetoothHelper.DisplayLabel("Data_READ_ONLY");
+                    await ManualTest.WaitForConfirm();
+                    return;
+                }
+
                 BluetoothSetup.CreateClientSocketUtil();
                 if (BluetoothSetup.Client == null)
                 {
index 278a952525fca30f82b3a0fd67aef94ef4728b0f..68de9878cacc5c57af16c9be10f06e4c57a30cf1 100755 (executable)
@@ -68,6 +68,14 @@ namespace Tizen.Network.Bluetooth.Tests
         {
             try
             {
+                /* We can't occupy the precondition, if BT feature is not supported in Manual TC */
+                if (_isBluetoothSupported == false)
+                {
+                    BluetoothHelper.DisplayLabel("Data_READ_ONLY_CLIENT");
+                    await ManualTest.WaitForConfirm();
+                    return;
+                }
+
                 BluetoothSetup.CreateClientSocketUtil();
                 if (BluetoothSetup.Client == null)
                 {