summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJimmy Chen <jimmycmchen@google.com>2020-07-07 02:09:11 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-07-07 02:09:11 +0000
commit3d205faf6d20804961e2196d3111bb1340802448 (patch)
tree24ebe8b938a155e0ae02c0b866e423088c64744f
parenteec3938ae4eda1a72100897a2aca56986ad72d05 (diff)
parenta1920dc42585d3d74c77edb1bf2a9f14a95e1ba7 (diff)
downloadplatform_tools_test_connectivity-3d205faf6d20804961e2196d3111bb1340802448.tar.gz
platform_tools_test_connectivity-3d205faf6d20804961e2196d3111bb1340802448.tar.bz2
platform_tools_test_connectivity-3d205faf6d20804961e2196d3111bb1340802448.zip
p2p: extend waiting timee for the group client lost event am: a1920dc425
Original change: https://googleplex-android-review.googlesource.com/c/platform/tools/test/connectivity/+/12085521 Change-Id: I9334e2749c5b6298e958b87a5ec6f4752176a0e1
-rw-r--r--acts/framework/acts/test_utils/wifi/p2p/wifi_p2p_const.py1
-rwxr-xr-xacts/framework/acts/test_utils/wifi/p2p/wifi_p2p_test_utils.py4
-rw-r--r--acts/tests/google/wifi/p2p/functional/WifiP2pManagerTest.py9
3 files changed, 9 insertions, 5 deletions
diff --git a/acts/framework/acts/test_utils/wifi/p2p/wifi_p2p_const.py b/acts/framework/acts/test_utils/wifi/p2p/wifi_p2p_const.py
index 6e0c95779d..87f405967e 100644
--- a/acts/framework/acts/test_utils/wifi/p2p/wifi_p2p_const.py
+++ b/acts/framework/acts/test_utils/wifi/p2p/wifi_p2p_const.py
@@ -28,6 +28,7 @@ DEFAULT_TIMEOUT = 30
DEFAULT_SLEEPTIME = 5
DEFAULT_FUNCTION_SWITCH_TIME = 10
DEFAULT_SERVICE_WAITING_TIME = 20
+DEFAULT_GROUP_CLIENT_LOST_TIME = 60
P2P_CONNECT_NEGOTIATION = 0
P2P_CONNECT_JOIN = 1
diff --git a/acts/framework/acts/test_utils/wifi/p2p/wifi_p2p_test_utils.py b/acts/framework/acts/test_utils/wifi/p2p/wifi_p2p_test_utils.py
index 2e94f48f4c..abd186f0d3 100755
--- a/acts/framework/acts/test_utils/wifi/p2p/wifi_p2p_test_utils.py
+++ b/acts/framework/acts/test_utils/wifi/p2p/wifi_p2p_test_utils.py
@@ -43,7 +43,7 @@ def is_discovered(event, ad):
return False
-def check_disconnect(ad):
+def check_disconnect(ad, timeout=p2pconsts.DEFAULT_TIMEOUT):
"""Check an Android device disconnect or not
Args:
@@ -51,7 +51,7 @@ def check_disconnect(ad):
"""
ad.droid.wifiP2pRequestConnectionInfo()
# wait disconnect event
- ad.ed.pop_event(p2pconsts.DISCONNECTED_EVENT, p2pconsts.DEFAULT_TIMEOUT)
+ ad.ed.pop_event(p2pconsts.DISCONNECTED_EVENT, timeout)
def p2p_disconnect(ad):
diff --git a/acts/tests/google/wifi/p2p/functional/WifiP2pManagerTest.py b/acts/tests/google/wifi/p2p/functional/WifiP2pManagerTest.py
index 1b941e2852..6bda400dd6 100644
--- a/acts/tests/google/wifi/p2p/functional/WifiP2pManagerTest.py
+++ b/acts/tests/google/wifi/p2p/functional/WifiP2pManagerTest.py
@@ -100,7 +100,8 @@ class WifiP2pManagerTest(WifiP2pBaseTest):
gc_dut.ed.clear_all_events()
wp2putils.p2p_connect(gc_dut, go_dut, True, WPS_PBC)
wp2putils.p2p_disconnect(gc_dut)
- wp2putils.check_disconnect(go_dut)
+ wp2putils.check_disconnect(
+ go_dut, timeout=p2pconsts.DEFAULT_GROUP_CLIENT_LOST_TIME)
time.sleep(p2pconsts.DEFAULT_FUNCTION_SWITCH_TIME)
@test_tracker_info(uuid="12bbe73a-5a6c-4307-9797-c77c7efdc4b5")
@@ -150,7 +151,8 @@ class WifiP2pManagerTest(WifiP2pBaseTest):
gc_dut.ed.clear_all_events()
wp2putils.p2p_connect(gc_dut, go_dut, True, WPS_DISPLAY)
wp2putils.p2p_disconnect(gc_dut)
- wp2putils.check_disconnect(go_dut)
+ wp2putils.check_disconnect(
+ go_dut, timeout=p2pconsts.DEFAULT_GROUP_CLIENT_LOST_TIME)
time.sleep(p2pconsts.DEFAULT_FUNCTION_SWITCH_TIME)
@test_tracker_info(uuid="efe88f57-5a08-4195-9592-2f6945a9d18a")
@@ -200,5 +202,6 @@ class WifiP2pManagerTest(WifiP2pBaseTest):
gc_dut.ed.clear_all_events()
wp2putils.p2p_connect(gc_dut, go_dut, True, WPS_KEYPAD)
wp2putils.p2p_disconnect(gc_dut)
- wp2putils.check_disconnect(go_dut)
+ wp2putils.check_disconnect(
+ go_dut, timeout=p2pconsts.DEFAULT_GROUP_CLIENT_LOST_TIME)
time.sleep(p2pconsts.DEFAULT_FUNCTION_SWITCH_TIME)