mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 06:29:23 +01:00
auto-t: fix testSAE autoconnect_test.py
This test was unreliable since it was assuming a periodic scan would happen at just the right time. Instead since we are expecting autoconnect we can just wait for DeviceState.connected then after we are connected verify the network was correct.
This commit is contained in:
parent
2bd2462968
commit
1f404e32a6
@ -23,20 +23,15 @@ class Test(unittest.TestCase):
|
|||||||
devices[2].disconnect()
|
devices[2].disconnect()
|
||||||
devices[3].disconnect()
|
devices[3].disconnect()
|
||||||
|
|
||||||
condition = 'obj.scanning'
|
condition = 'obj.state == DeviceState.connected'
|
||||||
wd.wait_for_object_condition(device, condition)
|
wd.wait_for_object_condition(device, condition, 30)
|
||||||
|
|
||||||
condition = 'not obj.scanning'
|
condition = 'obj.connected_network is not None'
|
||||||
wd.wait_for_object_condition(device, condition)
|
wd.wait_for_object_condition(device, condition)
|
||||||
|
|
||||||
ordered_network = device.get_ordered_network('ssidSAE')
|
ordered_network = device.get_ordered_network('ssidSAE')
|
||||||
|
|
||||||
self.assertEqual(ordered_network.type, NetworkType.psk)
|
self.assertTrue(ordered_network.network_object.connected)
|
||||||
|
|
||||||
condition = 'obj.connected'
|
|
||||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
|
||||||
|
|
||||||
device.wait_for_connected()
|
|
||||||
|
|
||||||
device.disconnect()
|
device.disconnect()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user