Browse Source

tests: Increase timeout for remote tests

Some operations take longer time on real hardware than on hwsim. This
commit increases two timeouts so that the tests will pass on real
hardware, too.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
Jonathan Afek 8 years ago
parent
commit
c7ca843d05
2 changed files with 4 additions and 2 deletions
  1. 2 1
      tests/hwsim/test_ap_qosmap.py
  2. 2 1
      tests/hwsim/wpasupplicant.py

+ 2 - 1
tests/hwsim/test_ap_qosmap.py

@@ -22,7 +22,8 @@ def check_qos_map(ap, hapd, dev, sta, dscp, tid, ap_tid=None):
     wt = Wlantest()
     wt = Wlantest()
     wt.clear_sta_counters(bssid, sta)
     wt.clear_sta_counters(bssid, sta)
     hwsim_utils.test_connectivity(dev, hapd, dscp=dscp, config=False)
     hwsim_utils.test_connectivity(dev, hapd, dscp=dscp, config=False)
-    time.sleep(0.02)
+    sleep_time = 0.02 if dev.hostname is None else 0.2
+    time.sleep(sleep_time)
     tx = wt.get_tx_tid(bssid, sta, tid)
     tx = wt.get_tx_tid(bssid, sta, tid)
     if tx == 0:
     if tx == 0:
         [ tx, rx ] = wt.get_tid_counters(bssid, sta)
         [ tx, rx ] = wt.get_tid_counters(bssid, sta)

+ 2 - 1
tests/hwsim/wpasupplicant.py

@@ -815,7 +815,8 @@ class WpaSupplicant:
             except:
             except:
                 pass
                 pass
             self.gctrl_mon = None
             self.gctrl_mon = None
-        ev = self.wait_global_event(["P2P-GROUP-REMOVED"], timeout=3)
+        timeout = 3 if self.hostname is None else 10
+        ev = self.wait_global_event(["P2P-GROUP-REMOVED"], timeout=timeout)
         if ev is None:
         if ev is None:
             raise Exception("Group removal event timed out")
             raise Exception("Group removal event timed out")
         if "reason=GO_ENDING_SESSION" not in ev:
         if "reason=GO_ENDING_SESSION" not in ev: