aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Prestwood <prestwoj@gmail.com>2020-05-06 14:32:15 -0700
committerDenis Kenzior <denkenz@gmail.com>2020-05-02 06:40:23 -0500
commitb600440ea2245e2545d24ef50fec4291fb9f6988 (patch)
treee75cf03995daa1275b3ab433a7f88bd32e34e16f
parentda3f66ea68a5efd3521d94580b6537671868040f (diff)
downloadiwd-b600440ea2245e2545d24ef50fec4291fb9f6988.tar.gz
auto-t: use scan_if_needed for testConnectAutoconnect
In certain cases the autoconnect portion of each subtest was connecting to the network so fast that the check for obj.scanning was never successful since IWD was already connected (and in turn not scanning). Since the autoconnect path will wait for the device to be connected there really isn't a reason to wait for any scanning conditions. The normal connect path does need to wait for scanning though, and for this we can now use the new scan_if_needed parameter to get_ordered_networks.
-rw-r--r--autotests/testConnectAutoconnect/validation.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/autotests/testConnectAutoconnect/validation.py b/autotests/testConnectAutoconnect/validation.py
index 43cbaf02e..6db479a95 100644
--- a/autotests/testConnectAutoconnect/validation.py
+++ b/autotests/testConnectAutoconnect/validation.py
@@ -12,7 +12,7 @@ from iwd import NetworkType
class TestConnectAutoConnect(unittest.TestCase):
def check_connect(self, wd, device, ssid, throws):
- ordered_network = device.get_ordered_network(ssid)
+ ordered_network = device.get_ordered_network(ssid, scan_if_needed=True)
condition = 'not obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
@@ -54,12 +54,6 @@ class TestConnectAutoConnect(unittest.TestCase):
self.assertIsNotNone(devices)
device = devices[0]
- condition = 'obj.scanning'
- wd.wait_for_object_condition(device, condition)
-
- condition = 'not obj.scanning'
- wd.wait_for_object_condition(device, condition)
-
if autoconnect:
self.check_autoconnect(wd, device, ssid, throws)
else: