tests: Make ap_wps_er_add_enrollee less likely to fail
authorJouni Malinen <j@w1.fi>
Tue, 7 Jan 2014 13:20:30 +0000 (15:20 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 7 Jan 2014 13:20:30 +0000 (15:20 +0200)
WPS-ER-AP-REMOVE event from the ER is sent before HTTP UNSUBSCRIBE has
been completed. As such, it was possible for the following scan
validation step to be started before the AP has had a chance to react to
the ER status change. Makes this less likely to fail by waiting 200 ms
before starting the last scan.

Signed-hostap: Jouni Malinen <j@w1.fi>

tests/hwsim/test_ap_wps.py

index 41460a9..49b0f7a 100644 (file)
@@ -660,6 +660,9 @@ def test_ap_wps_er_add_enrollee(dev, apdev):
     ev = dev[0].wait_event(["WPS-ER-AP-REMOVE"])
     if ev is None:
         raise Exception("WPS ER unsubscription timed out")
+    # It takes some time for the UPnP UNSUBSCRIBE command to go through, so wait
+    # a bit before verifying that the scan results have change.
+    time.sleep(0.2)
 
     dev[1].scan(freq="2412")
     bss = dev[1].get_bss(apdev[0]['bssid'])