diff options
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) |