auto-t: remove scanning wait from testConnectAutoconnect
PATCH 1/2 auto-t: remove scanning wait from testConnectAutoconnect
In certain cases the test was reaching this point once already finished with a scan. This caused the wait for 'scanning' to time out. At this point in the test we don't need to wait for scanning and only need to wait for scanning to finish. If scanning is already finished before validation we can simply validate at that time.
--- autotests/testConnectAutoconnect/validation.py | 3 --- 1 file changed, 3 deletions(-)
autotests/testConnectAutoconnect/validation.py +0 -3
@@ -54,9 +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)
Signature · 1 line
2.21.1
PATCH 2/2 auto-t: remove scanning wait from testHiddenNetworks
Same deal as with testKnownNetworks, the wait for scanning to stop has been removed since scanning may not be running at this point.
--- autotests/testHiddenNetworks/validation.py | 2 -- 1 file changed, 2 deletions(-)
autotests/testHiddenNetworks/validation.py +0 -2
@@ -50,8 +50,6 @@ class TestConnectAutoConnect(unittest.TestCase): device = devices[0] if autoconnect: - condition = 'obj.scanning' - wd.wait_for_object_condition(device, condition) condition = 'not obj.scanning' wd.wait_for_object_condition(device, condition)
Signature · 1 line
2.21.1
Kourt
Hi James,
Quoted 14 lines · James Prestwood
In certain cases the test was reaching this point once already finished with a scan. This caused the wait for 'scanning' to time out. At this point in the test we don't need to wait for scanning and only need to wait for scanning to finish. If scanning is already finished before validation we can simply validate at that time.
--- autotests/testConnectAutoconnect/validation.py | 3 --- 1 file changed, 3 deletions(-)autotests/testConnectAutoconnect/validation.py +0
-0
autotests/testConnectAutoconnect/validation.py class TestConnectAutoConnect(unittest.TestCase): · line 59
Quoted 6 lines
autotests/testConnectAutoconnect/validation.py +0
-3@@ -54,9 +54,6 @@ class TestConnectAutoConnect(unittest.TestCase): self.assertIsNotNone(devices) device = devices[0] - condition = 'obj.scanning' - wd.wait_for_object_condition(device, condition) -
What if the scan has never started yet? Since iwd is started from Python, it looks suspicious that it goes through the scan before it hits the conditional wait a few lines down the script. Perhaps changing to wd.list_devices(1) API has introduced this issue. Would it help to increase the conditional wait time out so it goes into the second round of scans for these certain cases?
autotests/testConnectAutoconnect/validation.py class TestConnectAutoConnect(unittest.TestCase): · line 59
Quoted 3 lines
autotests/testConnectAutoconnect/validation.py +0
-0condition = 'not obj.scanning' wd.wait_for_object_condition(device, condition)
Best,
Tim
Hi Tim,
Quoted 21 lines · Tim A
Hi James,
Quoted 17 lines · James Prestwood
In certain cases the test was reaching this point once already finished with a scan. This caused the wait for 'scanning' to time out. At this point in the test we don't need to wait for scanning and only need to wait for scanning to finish. If scanning is already finished before validation we can simply validate at that time.
--- autotests/testConnectAutoconnect/validation.py | 3 --- 1 file changed, 3 deletions(-)autotests/testConnectAutoconnect/validation.py +0
-0@@ -54,9 +54,6 @@ class TestConnectAutoConnect(unittest.TestCase): self.assertIsNotNone(devices) device = devices[0]
Quoted 9 lines
autotests/testConnectAutoconnect/validation.py class TestConnectAutoConnect(unittest.TestCase): · line 59
Quoted 3 lines
autotests/testConnectAutoconnect/validation.py +0
-3- condition = 'obj.scanning' - wd.wait_for_object_condition(device, condition) -What if the scan has never started yet? Since iwd is started from Python, it looks suspicious that it goes through the scan before it hits the conditional wait a few lines down the script. Perhaps changing to
wd.list_devices(1)API has introduced this issue. Would it help to increase the conditional wait time out so it goes into the second round of scans for these certain cases?
I can try increasing the timeout, but I think relying on periodic scans for this autotest isn't the best way to go about it. I will try explicitly scanning via dbus, otherwise you are just hoping that a periodic scan was started. This timing will vary slightly between systems which is why I think I am hitting this.
Quoted 6 lines
autotests/testConnectAutoconnect/validation.py class TestConnectAutoConnect(unittest.TestCase): · line 59
Quoted 4 lines
autotests/testConnectAutoconnect/validation.py +0
-0condition = 'not obj.scanning' wd.wait_for_object_condition(device, condition)Best,
Tim
Kourt
Hi James,
Quoted 9 lines
Quoted 9 lines
autotests/testConnectAutoconnect/validation.py class TestConnectAutoConnect(unittest.TestCase): · line 59
Quoted 3 lines
autotests/testConnectAutoconnect/validation.py +0
-3- condition = 'obj.scanning' - wd.wait_for_object_condition(device, condition) -What if the scan has never started yet? Since iwd is started from Python, it looks suspicious that it goes through the scan before it hits the conditional wait a few lines down the script. Perhaps changing to
wd.list_devices(1)API has introduced this issue. Would it help to increase the conditional wait time out so it goes into the second round of scans for these certain cases?
Quoted 5 lines
I can try increasing the timeout, but I think relying on periodic scans for this autotest isn't the best way to go about it. I will try explicitly scanning via dbus, otherwise you are just hoping that a periodic scan was started. This timing will vary slightly between systems which is why I think I am hitting this.
The purpose of this autotest and of the one with the hidden networks is to exercise auto-connection without an explicit call from Dbus (different code paths).