From: Jouni Malinen Date: Fri, 20 Mar 2015 15:51:18 +0000 (+0200) Subject: tests: Make ap_vlan_wpa2_radius_id_change more robust X-Git-Tag: hostap_2_5~938 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8aba435b16cda1c3f3e7db18cd3bff3a0864bef1;p=thirdparty%2Fhostap.git tests: Make ap_vlan_wpa2_radius_id_change more robust Wait for the 4-way handshake completion instead of assuming it gets done in 0.1 seconds. Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_ap_vlan.py b/tests/hwsim/test_ap_vlan.py index cd452976b..7b10ea765 100644 --- a/tests/hwsim/test_ap_vlan.py +++ b/tests/hwsim/test_ap_vlan.py @@ -113,7 +113,9 @@ def test_ap_vlan_wpa2_radius_id_change(dev, apdev): ev = dev[0].wait_event(["CTRL-EVENT-EAP-SUCCESS"], timeout=15) if ev is None: raise Exception("EAP reauthentication timed out") - time.sleep(0.1) + ev = dev[0].wait_event(["WPA: Key negotiation completed"], timeout=5) + if ev is None: + raise Exception("4-way handshake after reauthentication timed out") state = dev[0].get_status_field('wpa_state') if state != "COMPLETED": raise Exception("Unexpected state after reauth: " + state)