mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 06:29:23 +01:00
auto-t: speed up testRoamRetry
This test took quite a while to execute (~2 minutes on my machine) because there was simply no other way to test this scenario but waiting. Now the no-roam-candidates condition can be waited for rather than just sleeping for 20 seconds. Additionally the default RoamRetryInterval was being used which is 60 seconds. Instead main.conf can set this to 5 seconds and really cut down on the time to wait. Part of a comment was also removed due to being incorrect. Even with neighbor reports IWD still must scan, its just that the scan is more limited and, in theory, faster.
This commit is contained in:
parent
36777d1e68
commit
78f5a5dde4
@ -82,7 +82,7 @@ class Test(unittest.TestCase):
|
||||
# schedule another attempt for 60 seconds later
|
||||
rule0.signal = -8000
|
||||
|
||||
wd.wait(20)
|
||||
device.wait_for_event('no-roam-candidates')
|
||||
|
||||
self.assertEqual(device.state, iwd.DeviceState.connected)
|
||||
self.assertTrue(bss_hostapd[0].list_sta())
|
||||
@ -99,13 +99,12 @@ class Test(unittest.TestCase):
|
||||
wd.wait(1)
|
||||
|
||||
# Assert low signal for BSS 0, check that iwd starts transition to BSS 1
|
||||
# in less than 10 seconds. Because of the neighbor report a scan should
|
||||
# not be necessary.
|
||||
# in less than 10 seconds.
|
||||
rule0.signal = -8000
|
||||
rule1.signal = -2000
|
||||
|
||||
condition = 'obj.state == DeviceState.roaming'
|
||||
wd.wait_for_object_condition(device, condition, max_wait=10)
|
||||
wd.wait_for_object_condition(device, condition, max_wait=15)
|
||||
|
||||
# Check that iwd is on BSS 1 once out of roaming state and doesn't
|
||||
# go through 'disconnected', 'autoconnect', 'connecting' in between
|
||||
|
2
autotests/testRoamRetry/main.conf
Normal file
2
autotests/testRoamRetry/main.conf
Normal file
@ -0,0 +1,2 @@
|
||||
[General]
|
||||
RoamRetryInterval=5
|
@ -99,7 +99,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
condition = 'obj.state == DeviceState.roaming'
|
||||
self.assertRaises(TimeoutError, wd.wait_for_object_condition, device,
|
||||
condition, max_wait=70)
|
||||
condition, max_wait=10)
|
||||
|
||||
device.disconnect()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user