aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Afek <jonathan@wizery.com>2016-07-13 17:06:03 (GMT)
committerJouni Malinen <j@w1.fi>2016-09-17 19:09:36 (GMT)
commit67a0d4f94ecebbf72ed20310684192f7aa51f13a (patch)
treedfafc2dcc827e2a341baa552c82706d611351bf9
parentea19b39f60b60494e17171aae5556cca2addff47 (diff)
downloadhostap-67a0d4f94ecebbf72ed20310684192f7aa51f13a.zip
hostap-67a0d4f94ecebbf72ed20310684192f7aa51f13a.tar.gz
hostap-67a0d4f94ecebbf72ed20310684192f7aa51f13a.tar.bz2
tests: Increase connection timeouts for remote tests
Use increased timeouts for connect and disconnect since these operations take a longer time on real harware than they do on hwsim. Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
-rw-r--r--tests/hwsim/wpasupplicant.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/hwsim/wpasupplicant.py b/tests/hwsim/wpasupplicant.py
index d50a4c8..d3f5c9f 100644
--- a/tests/hwsim/wpasupplicant.py
+++ b/tests/hwsim/wpasupplicant.py
@@ -405,7 +405,9 @@ class WpaSupplicant:
raise Exception("MESH_GROUP_REMOVE failed")
return None
- def connect_network(self, id, timeout=10):
+ def connect_network(self, id, timeout=None):
+ if timeout is None:
+ timeout = 10 if self.hostname is None else 60
self.dump_monitor()
self.select_network(id)
self.wait_connected(timeout=timeout)
@@ -1239,7 +1241,9 @@ class WpaSupplicant:
raise Exception(error)
return ev
- def wait_disconnected(self, timeout=10, error="Disconnection timed out"):
+ def wait_disconnected(self, timeout=None, error="Disconnection timed out"):
+ if timeout is None:
+ timeout = 10 if self.hostname is None else 30
ev = self.wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=timeout)
if ev is None:
raise Exception(error)