From 8697cbc0f84782a83ad65a2bc92aa71a1ece67ce Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 7 Jan 2014 15:20:30 +0200 Subject: [PATCH] tests: Make ap_wps_er_add_enrollee less likely to fail 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 --- tests/hwsim/test_ap_wps.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py index 41460a9dd..49b0f7af3 100644 --- a/tests/hwsim/test_ap_wps.py +++ b/tests/hwsim/test_ap_wps.py @@ -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'])