summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-04-09 04:08:31 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2022-04-09 04:08:31 +0000
commit5bc0bf7e1c06d0d77b968a8424a04999f6ffc369 (patch)
tree6ce609e4fab0448e22675216b111c12df40b6c0b
parent9a5550d90d63caa8af9c5b9d5c79febbc85c0d1e (diff)
parentc4478e93bfef3b237b60cb247bf622aec19f2a17 (diff)
downloadcts-sparse-8430561-L04400000954274717.tar.gz
Merge "Snap for 8428804 from 6e8e5dd4eecf1fa391940d0423c4f507240f80cd to android11-tests-release" into android11-tests-releasesparse-8430561-L04400000954274717
-rw-r--r--tests/tests/wifi/src/android/net/wifi/cts/WifiManagerTest.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/tests/wifi/src/android/net/wifi/cts/WifiManagerTest.java b/tests/tests/wifi/src/android/net/wifi/cts/WifiManagerTest.java
index 3379b18d964..61c9f845ace 100644
--- a/tests/tests/wifi/src/android/net/wifi/cts/WifiManagerTest.java
+++ b/tests/tests/wifi/src/android/net/wifi/cts/WifiManagerTest.java
@@ -145,6 +145,7 @@ public class WifiManagerTest extends WifiJUnit3TestBase {
private static final int SCAN_TEST_WAIT_DURATION_MS = 15_000;
private static final int TEST_WAIT_DURATION_MS = 10_000;
private static final int WIFI_CONNECT_TIMEOUT_MILLIS = 30_000;
+ private static final int WIFI_PNO_CONNECT_TIMEOUT_MILLIS = 90_000;
private static final int WAIT_MSEC = 60;
private static final int DURATION_SCREEN_TOGGLE = 2000;
private static final int DURATION_SETTINGS_TOGGLE = 1_000;
@@ -399,6 +400,10 @@ public class WifiManagerTest extends WifiJUnit3TestBase {
}
}
+ private void waitForConnection(int timeoutMillis) throws Exception {
+ waitForNetworkInfoState(NetworkInfo.State.CONNECTED, timeoutMillis);
+ }
+
private void waitForConnection() throws Exception {
waitForNetworkInfoState(NetworkInfo.State.CONNECTED, WIFI_CONNECT_TIMEOUT_MILLIS);
}
@@ -2102,7 +2107,7 @@ public class WifiManagerTest extends WifiJUnit3TestBase {
}
// make sure we're connected
- waitForConnection();
+ waitForConnection(WIFI_PNO_CONNECT_TIMEOUT_MILLIS);
WifiInfo currentNetwork = ShellIdentityUtils.invokeWithShellPermissions(
mWifiManager::getConnectionInfo);