diff options
author | Xia Wang <xiaw@google.com> | 2011-12-05 15:52:34 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-12-05 15:52:34 -0800 |
commit | e63d67eff794ba2e4e5d2aa9e8854b37329f4429 (patch) | |
tree | 919e11cfa4afad084c9cac64d6747bdde1a13de0 /core | |
parent | da926cf284ff5f5ccf91dec088ff64d442cee25c (diff) | |
parent | 10a3e8fae865f17c10816d1767d2efa3d4a18935 (diff) | |
download | frameworks_base-e63d67eff794ba2e4e5d2aa9e8854b37329f4429.zip frameworks_base-e63d67eff794ba2e4e5d2aa9e8854b37329f4429.tar.gz frameworks_base-e63d67eff794ba2e4e5d2aa9e8854b37329f4429.tar.bz2 |
Merge "Add extra 2 minute for wifi to shutdown" into ics-mr1
Diffstat (limited to 'core')
-rw-r--r-- | core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiStressTest.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiStressTest.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiStressTest.java index 0b32fde..2069789 100644 --- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiStressTest.java +++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiStressTest.java @@ -63,10 +63,12 @@ public class WifiStressTest private final static long WIFI_IDLE_MS = 60 * 1000; /** - * The delay for Wi-Fi to get into idle, after screen off + WIFI_IDEL_MS + WIFI_IDLE_DELAY - * the Wi-Fi should be in idle mode and device should be in cellular mode. + * Delay after issuing wifi shutdown. + * The framework keep driver up for at leat 2 minutes to avoid problems + * that a quick shutdown could cause on wext driver and protentially + * on cfg based driver */ - private final static long WIFI_IDLE_DELAY = 3 * 1000; + private final static long WIFI_SHUTDOWN_DELAY = 2 * 60 * 1000; private final static String OUTPUT_FILE = "WifiStressTestOutput.txt"; private ConnectivityManagerTestActivity mAct; @@ -265,7 +267,7 @@ public class WifiStressTest PowerManager pm = (PowerManager)mRunner.getContext().getSystemService(Context.POWER_SERVICE); assertFalse(pm.isScreenOn()); - sleep(WIFI_IDLE_MS, "Interruped while wait for wifi to be idle"); + sleep(WIFI_IDLE_MS + WIFI_SHUTDOWN_DELAY, "Interruped while wait for wifi to be idle"); assertTrue("Wait for Wi-Fi to idle timeout", mAct.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.DISCONNECTED, 6 * ConnectivityManagerTestActivity.SHORT_TIMEOUT)); @@ -273,9 +275,9 @@ public class WifiStressTest // use long timeout as the pppd startup may take several retries. assertTrue("Wait for cellular connection timeout", mAct.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED, - ConnectivityManagerTestActivity.LONG_TIMEOUT)); + 2 * ConnectivityManagerTestActivity.LONG_TIMEOUT)); } - sleep(mWifiSleepTime + WIFI_IDLE_DELAY, "Interrupted while device is in sleep mode"); + sleep(mWifiSleepTime, "Interrupted while device is in sleep mode"); // Verify the wi-fi is still off and data connection is on assertEquals("Wi-Fi is reconnected", State.DISCONNECTED, mAct.mCM.getNetworkInfo(ConnectivityManager.TYPE_WIFI).getState()); |