[Network][Non-ACR] Add delay to avoid affecting the next tct 12/186712/1
authorchleun.moon <chleun.moon@samsung.com>
Tue, 14 Aug 2018 00:20:27 +0000 (09:20 +0900)
committerchleun.moon <chleun.moon@samsung.com>
Tue, 14 Aug 2018 00:20:40 +0000 (09:20 +0900)
WiFiAP.Update() changes WiFi state to Configuration, then changes the
state to Connected state when Update() is completed.
Delay is added to ensure that the next tct runs after the state is changed to Connected.

Change-Id: I99f84d0e24d15ec0c53fabd9049ea5425faf80cd
Signed-off-by: Cheoleun Moon <chleun.moon@samsung.com>
tct-suite-vs/Tizen.Network.Tests/testcase/TSWiFiAP.cs [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 80e58b0..581d60c
@@ -543,7 +543,7 @@ namespace Tizen.Network.WiFi.Tests
                 Assert.IsNotNull(_wifiAP, "No WiFi connection");
                 _wifiAP.Dispose();
                 await _wifiAP.ForgetAPAsync();
-                Task.Delay(2000);
+                await Task.Delay(2000);
                 Assert.IsTrue(false, "ObjectDisposedException should be thrown");
             }
             catch (NotSupportedException)
@@ -591,9 +591,9 @@ namespace Tizen.Network.WiFi.Tests
                 Assert.IsNotNull(_wifiAP, "No WiFi connection");
 
                 await TearDown();
-                Task.Delay(2000);
+                await Task.Delay(2000);
                 await _wifiAP.ForgetAPAsync();
-                Task.Delay(2000);
+                await Task.Delay(2000);
                 Assert.IsTrue(false, "InvalidOperationException should be thrown");
             }
             catch (NotSupportedException)
@@ -650,6 +650,7 @@ namespace Tizen.Network.WiFi.Tests
                 ipv4Setting.IP = IPAddress.Parse(ip);
 
                 _wifiAP.Update();
+                await Task.Delay(2000);
                 Assert.AreEqual(ip.ToString(), ipv4Setting.IP.ToString(), "Ip of Ipv4Setting get should be same set");
                 Log.Info(Globals.LogTag, "Successfully done");
 
@@ -659,6 +660,7 @@ namespace Tizen.Network.WiFi.Tests
                 ipv4Setting.IPConfigType = IPConfigType.Static;
                 ipv4Setting.IP = IPAddress.Parse(oldIP);
                 _wifiAP.Update();
+                await Task.Delay(2000);
             }
             catch (NotSupportedException)
             {