Skip to contentSkip to conversation

auto-t: fix FT over DS test to wait for connected

PATCH New James Prestwood 1 participant 1 message Nov 24, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 auto-t: fix FT over DS test to wait for connected

Due to timing this test sometimes does not pass because it was just asserting on the device state rather than waiting for a change. This generally worked but not always.

---
 autotests/testFT-PSK-over-DS/connection_test.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
autotests/testFT-PSK-over-DS/connection_test.py +3 -1
index 28a045ef..b6cad5a4 100644
@@ -88,7 +88,9 @@ class Test(unittest.TestCase):
         condition = 'obj.state != DeviceState.roaming'
         wd.wait_for_object_condition(device, condition)
 
-        self.assertEqual(device.state, iwd.DeviceState.connected)
+        condition = 'obj.state == DeviceState.connected'
+        wd.wait_for_object_condition(device, condition)
+
         self.assertTrue(self.bss_hostapd[1].list_sta())
 
         testutil.test_iface_operstate(device.name)
Signature · 1 line
2.26.2