am da822367
: am 25261f59
: Merge "Increase time between wifi stop and wifi start: set to 2 minutes http://b/issue?id=5629901" into ics-mr0
* commit 'da822367886d68f997153c7edd5368f3dfb6d58d': Increase time between wifi stop and wifi start: set to 2 minutes http://b/issue?id=5629901
This commit is contained in:
@ -38,7 +38,8 @@ public class ConnectivityManagerStressTestRunner extends InstrumentationTestRunn
|
||||
public int mSoftapIterations = 100;
|
||||
public int mScanIterations = 100;
|
||||
public int mReconnectIterations = 100;
|
||||
public int mSleepTime = 30 * 1000; // default sleep time is 30 seconds
|
||||
// sleep time before restart wifi, default is set to 2 minutes
|
||||
public int mSleepTime = 2 * 60 * 1000;
|
||||
public String mReconnectSsid = "securenetdhcp";
|
||||
public String mReconnectPassword = "androidwifi";
|
||||
|
||||
|
@ -62,6 +62,8 @@ public class ConnectivityManagerTestActivity extends Activity {
|
||||
public static final int WIFI_SCAN_TIMEOUT = 50 * 1000;
|
||||
public static final int SHORT_TIMEOUT = 5 * 1000;
|
||||
public static final long LONG_TIMEOUT = 50 * 1000;
|
||||
// 2 minutes timer between wifi stop and start
|
||||
public static final long WIFI_STOP_START_INTERVAL = 2 * 60 * 1000;
|
||||
public static final int SUCCESS = 0; // for Wifi tethering state change
|
||||
public static final int FAILURE = 1;
|
||||
public static final int INIT = -1;
|
||||
@ -247,6 +249,8 @@ public class ConnectivityManagerTestActivity extends Activity {
|
||||
sleep(SHORT_TIMEOUT);
|
||||
removeConfiguredNetworksAndDisableWifi();
|
||||
mWifiRegexs = mCM.getTetherableWifiRegexs();
|
||||
// after wifi is shutdown, wait for 2 minute to enable wifi
|
||||
sleep(WIFI_STOP_START_INTERVAL);
|
||||
}
|
||||
|
||||
public List<WifiConfiguration> loadNetworkConfigurations() throws Exception {
|
||||
|
@ -77,10 +77,13 @@ public class NetworkState {
|
||||
mReason = "no state is recorded.";
|
||||
return false;
|
||||
} else if (mStateDepository.size() > 1) {
|
||||
Log.v(LOG_TAG, "no broadcast is expected, " +
|
||||
"instead broadcast is probably received");
|
||||
mReason = "no broadcast is expected, instead broadcast is probably received";
|
||||
for (int i = 0; i < mStateDepository.size(); i++) {
|
||||
if (mStateDepository.get(i) != mTransitionTarget) {
|
||||
Log.v(LOG_TAG, "state changed.");
|
||||
mReason = "Unexpected state change";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else if (mStateDepository.get(0) != mTransitionTarget) {
|
||||
Log.v(LOG_TAG, mTransitionTarget + " is expected, but it is " +
|
||||
mStateDepository.get(0));
|
||||
|
@ -66,7 +66,7 @@ public class ConnectivityManagerMobileTest
|
||||
// Each test case will start with cellular connection
|
||||
if (Settings.System.getInt(getInstrumentation().getContext().getContentResolver(),
|
||||
Settings.System.AIRPLANE_MODE_ON) == 1) {
|
||||
Log.v(LOG_TAG, "airplane is not disabled, disable it.");
|
||||
log("airplane is not disabled, disable it.");
|
||||
cmActivity.setAirplaneMode(getInstrumentation().getContext(), false);
|
||||
}
|
||||
if (!UtilHelper.isWifiOnly()) {
|
||||
@ -84,13 +84,13 @@ public class ConnectivityManagerMobileTest
|
||||
@Override
|
||||
public void tearDown() throws Exception {
|
||||
cmActivity.finish();
|
||||
Log.v(LOG_TAG, "tear down ConnectivityManagerTestActivity");
|
||||
log("tear down ConnectivityManagerTestActivity");
|
||||
wl.release();
|
||||
cmActivity.removeConfiguredNetworksAndDisableWifi();
|
||||
// if airplane mode is set, disable it.
|
||||
if (Settings.System.getInt(getInstrumentation().getContext().getContentResolver(),
|
||||
Settings.System.AIRPLANE_MODE_ON) == 1) {
|
||||
Log.v(LOG_TAG, "disable airplane mode if it is enabled");
|
||||
log("disable airplane mode if it is enabled");
|
||||
cmActivity.setAirplaneMode(getInstrumentation().getContext(), false);
|
||||
}
|
||||
super.tearDown();
|
||||
@ -104,17 +104,24 @@ public class ConnectivityManagerMobileTest
|
||||
assertTrue("not connected to cellular network", extraNetInfo.isConnected());
|
||||
}
|
||||
|
||||
private void log(String message) {
|
||||
Log.v(LOG_TAG, message);
|
||||
}
|
||||
|
||||
private void sleep(long sleeptime) {
|
||||
try {
|
||||
Thread.sleep(sleeptime);
|
||||
} catch (InterruptedException e) {}
|
||||
}
|
||||
|
||||
// Test case 1: Test enabling Wifi without associating with any AP, no broadcast on network
|
||||
// event should be expected.
|
||||
@LargeTest
|
||||
public void test3GToWifiNotification() {
|
||||
// Enable Wi-Fi to avoid initial UNKNOWN state
|
||||
cmActivity.enableWifi();
|
||||
try {
|
||||
Thread.sleep(2 * ConnectivityManagerTestActivity.SHORT_TIMEOUT);
|
||||
} catch (Exception e) {
|
||||
Log.v(LOG_TAG, "exception: " + e.toString());
|
||||
}
|
||||
sleep(2 * ConnectivityManagerTestActivity.SHORT_TIMEOUT);
|
||||
|
||||
// Wi-Fi is disabled
|
||||
cmActivity.disableWifi();
|
||||
|
||||
@ -123,11 +130,8 @@ public class ConnectivityManagerMobileTest
|
||||
assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE,
|
||||
State.CONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT));
|
||||
// Wait for 10 seconds for broadcasts to be sent out
|
||||
try {
|
||||
Thread.sleep(10 * 1000);
|
||||
} catch (Exception e) {
|
||||
fail("thread in sleep is interrupted.");
|
||||
}
|
||||
sleep(10 * 1000);
|
||||
|
||||
// As Wifi stays in DISCONNETED, Mobile statys in CONNECTED,
|
||||
// the connectivity manager will not broadcast any network connectivity event for Wifi
|
||||
NetworkInfo networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
|
||||
@ -138,22 +142,18 @@ public class ConnectivityManagerMobileTest
|
||||
NetworkState.DO_NOTHING, State.DISCONNECTED);
|
||||
// Eanble Wifi without associating with any AP
|
||||
cmActivity.enableWifi();
|
||||
try {
|
||||
Thread.sleep(2 * ConnectivityManagerTestActivity.SHORT_TIMEOUT);
|
||||
} catch (Exception e) {
|
||||
Log.v(LOG_TAG, "exception: " + e.toString());
|
||||
}
|
||||
sleep(2 * ConnectivityManagerTestActivity.SHORT_TIMEOUT);
|
||||
|
||||
// validate state and broadcast
|
||||
if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_WIFI)) {
|
||||
Log.v(LOG_TAG, "the state for WIFI is changed");
|
||||
Log.v(LOG_TAG, "reason: " +
|
||||
log("the state for WIFI is changed");
|
||||
log("reason: " +
|
||||
cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_WIFI));
|
||||
assertTrue("state validation fail", false);
|
||||
}
|
||||
if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_MOBILE)) {
|
||||
Log.v(LOG_TAG, "the state for MOBILE is changed");
|
||||
Log.v(LOG_TAG, "reason: " +
|
||||
log("the state for MOBILE is changed");
|
||||
log("reason: " +
|
||||
cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_MOBILE));
|
||||
assertTrue("state validation fail", false);
|
||||
}
|
||||
@ -182,7 +182,7 @@ public class ConnectivityManagerMobileTest
|
||||
|
||||
assertTrue(cmActivity.waitForWifiState(WifiManager.WIFI_STATE_ENABLED,
|
||||
ConnectivityManagerTestActivity.LONG_TIMEOUT));
|
||||
Log.v(LOG_TAG, "wifi state is enabled");
|
||||
log("wifi state is enabled");
|
||||
assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED,
|
||||
ConnectivityManagerTestActivity.LONG_TIMEOUT));
|
||||
if (!UtilHelper.isWifiOnly()) {
|
||||
@ -192,15 +192,15 @@ public class ConnectivityManagerMobileTest
|
||||
|
||||
// validate states
|
||||
if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_WIFI)) {
|
||||
Log.v(LOG_TAG, "Wifi state transition validation failed.");
|
||||
Log.v(LOG_TAG, "reason: " +
|
||||
log("Wifi state transition validation failed.");
|
||||
log("reason: " +
|
||||
cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_WIFI));
|
||||
assertTrue(false);
|
||||
}
|
||||
if (!UtilHelper.isWifiOnly()) {
|
||||
if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_MOBILE)) {
|
||||
Log.v(LOG_TAG, "Mobile state transition validation failed.");
|
||||
Log.v(LOG_TAG, "reason: " +
|
||||
log("Mobile state transition validation failed.");
|
||||
log("reason: " +
|
||||
cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_MOBILE));
|
||||
assertTrue(false);
|
||||
}
|
||||
@ -219,16 +219,11 @@ public class ConnectivityManagerMobileTest
|
||||
assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED,
|
||||
ConnectivityManagerTestActivity.LONG_TIMEOUT));
|
||||
|
||||
try {
|
||||
Thread.sleep(ConnectivityManagerTestActivity.SHORT_TIMEOUT);
|
||||
} catch (Exception e) {
|
||||
Log.v(LOG_TAG, "exception: " + e.toString());
|
||||
}
|
||||
|
||||
sleep(ConnectivityManagerTestActivity.SHORT_TIMEOUT);
|
||||
// Disable Wifi
|
||||
Log.v(LOG_TAG, "Disable Wifi");
|
||||
log("Disable Wifi");
|
||||
if (!cmActivity.disableWifi()) {
|
||||
Log.v(LOG_TAG, "disable Wifi failed");
|
||||
log("disable Wifi failed");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -254,8 +249,10 @@ public class ConnectivityManagerMobileTest
|
||||
cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_WIFI, networkInfo.getState(),
|
||||
NetworkState.TO_CONNECTION, State.CONNECTED);
|
||||
|
||||
// wait for 2 minutes before restart wifi
|
||||
sleep(ConnectivityManagerTestActivity.WIFI_STOP_START_INTERVAL);
|
||||
// Enable Wifi again
|
||||
Log.v(LOG_TAG, "Enable Wifi again");
|
||||
log("Enable Wifi again");
|
||||
cmActivity.enableWifi();
|
||||
|
||||
// Wait for Wifi to be connected and mobile to be disconnected
|
||||
@ -268,8 +265,8 @@ public class ConnectivityManagerMobileTest
|
||||
|
||||
// validate wifi states
|
||||
if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_WIFI)) {
|
||||
Log.v(LOG_TAG, "Wifi state transition validation failed.");
|
||||
Log.v(LOG_TAG, "reason: " +
|
||||
log("Wifi state transition validation failed.");
|
||||
log("reason: " +
|
||||
cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_WIFI));
|
||||
assertTrue(false);
|
||||
}
|
||||
@ -288,11 +285,7 @@ public class ConnectivityManagerMobileTest
|
||||
ConnectivityManagerTestActivity.LONG_TIMEOUT));
|
||||
|
||||
// Wait for a few seconds to avoid the state that both Mobile and Wifi is connected
|
||||
try {
|
||||
Thread.sleep(ConnectivityManagerTestActivity.SHORT_TIMEOUT);
|
||||
} catch (Exception e) {
|
||||
Log.v(LOG_TAG, "exception: " + e.toString());
|
||||
}
|
||||
sleep(ConnectivityManagerTestActivity.SHORT_TIMEOUT);
|
||||
|
||||
NetworkInfo networkInfo;
|
||||
if (!UtilHelper.isWifiOnly()) {
|
||||
@ -318,15 +311,15 @@ public class ConnectivityManagerMobileTest
|
||||
|
||||
// validate states
|
||||
if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_WIFI)) {
|
||||
Log.v(LOG_TAG, "Wifi state transition validation failed.");
|
||||
Log.v(LOG_TAG, "reason: " +
|
||||
log("Wifi state transition validation failed.");
|
||||
log("reason: " +
|
||||
cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_WIFI));
|
||||
assertTrue(false);
|
||||
}
|
||||
if (!UtilHelper.isWifiOnly()) {
|
||||
if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_MOBILE)) {
|
||||
Log.v(LOG_TAG, "Mobile state transition validation failed.");
|
||||
Log.v(LOG_TAG, "reason: " +
|
||||
log("Mobile state transition validation failed.");
|
||||
log("reason: " +
|
||||
cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_MOBILE));
|
||||
assertTrue(false);
|
||||
}
|
||||
@ -346,19 +339,16 @@ public class ConnectivityManagerMobileTest
|
||||
assertEquals(State.DISCONNECTED, networkInfo.getState());
|
||||
|
||||
// Enable airplane mode
|
||||
log("Enable airplane mode");
|
||||
cmActivity.setAirplaneMode(getInstrumentation().getContext(), true);
|
||||
try {
|
||||
Thread.sleep(ConnectivityManagerTestActivity.SHORT_TIMEOUT);
|
||||
} catch (Exception e) {
|
||||
Log.v(LOG_TAG, "exception: " + e.toString());
|
||||
}
|
||||
sleep(ConnectivityManagerTestActivity.SHORT_TIMEOUT);
|
||||
|
||||
networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
|
||||
assertEquals(State.DISCONNECTED, networkInfo.getState());
|
||||
|
||||
if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_MOBILE)) {
|
||||
Log.v(LOG_TAG, "Mobile state transition validation failed.");
|
||||
Log.v(LOG_TAG, "reason: " +
|
||||
log("Mobile state transition validation failed.");
|
||||
log("reason: " +
|
||||
cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_MOBILE));
|
||||
assertTrue(false);
|
||||
}
|
||||
@ -381,14 +371,14 @@ public class ConnectivityManagerMobileTest
|
||||
|
||||
// Validate the state transition
|
||||
if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_MOBILE)) {
|
||||
Log.v(LOG_TAG, "Mobile state transition validation failed.");
|
||||
Log.v(LOG_TAG, "reason: " +
|
||||
log("Mobile state transition validation failed.");
|
||||
log("reason: " +
|
||||
cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_MOBILE));
|
||||
assertTrue(false);
|
||||
}
|
||||
if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_WIFI)) {
|
||||
Log.v(LOG_TAG, "Wifi state transition validation failed.");
|
||||
Log.v(LOG_TAG, "reason: " +
|
||||
log("Wifi state transition validation failed.");
|
||||
log("reason: " +
|
||||
cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_WIFI));
|
||||
assertTrue(false);
|
||||
}
|
||||
@ -399,6 +389,7 @@ public class ConnectivityManagerMobileTest
|
||||
public void testDataConnectionOverAMWithWifi() {
|
||||
assertNotNull("SSID is null", TEST_ACCESS_POINT);
|
||||
// Eanble airplane mode
|
||||
log("Enable airplane mode");
|
||||
cmActivity.setAirplaneMode(getInstrumentation().getContext(), true);
|
||||
|
||||
NetworkInfo networkInfo;
|
||||
@ -423,15 +414,15 @@ public class ConnectivityManagerMobileTest
|
||||
|
||||
// validate state and broadcast
|
||||
if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_WIFI)) {
|
||||
Log.v(LOG_TAG, "state validate for Wifi failed");
|
||||
Log.v(LOG_TAG, "reason: " +
|
||||
log("state validate for Wifi failed");
|
||||
log("reason: " +
|
||||
cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_WIFI));
|
||||
assertTrue("State validation failed", false);
|
||||
}
|
||||
if (!UtilHelper.isWifiOnly()) {
|
||||
if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_MOBILE)) {
|
||||
Log.v(LOG_TAG, "state validation for Mobile failed");
|
||||
Log.v(LOG_TAG, "reason: " +
|
||||
log("state validation for Mobile failed");
|
||||
log("reason: " +
|
||||
cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_MOBILE));
|
||||
assertTrue("state validation failed", false);
|
||||
}
|
||||
@ -454,7 +445,7 @@ public class ConnectivityManagerMobileTest
|
||||
try {
|
||||
Thread.sleep(ConnectivityManagerTestActivity.SHORT_TIMEOUT);
|
||||
} catch (Exception e) {
|
||||
Log.v(LOG_TAG, "exception: " + e.toString());
|
||||
log("exception: " + e.toString());
|
||||
}
|
||||
|
||||
// Enable airplane mode without clearing Wifi
|
||||
@ -466,7 +457,7 @@ public class ConnectivityManagerMobileTest
|
||||
try {
|
||||
Thread.sleep(ConnectivityManagerTestActivity.SHORT_TIMEOUT);
|
||||
} catch (Exception e) {
|
||||
Log.v(LOG_TAG, "exception: " + e.toString());
|
||||
log("exception: " + e.toString());
|
||||
}
|
||||
|
||||
// Prepare for state validation
|
||||
@ -487,8 +478,8 @@ public class ConnectivityManagerMobileTest
|
||||
|
||||
// validate the state transition
|
||||
if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_WIFI)) {
|
||||
Log.v(LOG_TAG, "Wifi state transition validation failed.");
|
||||
Log.v(LOG_TAG, "reason: " +
|
||||
log("Wifi state transition validation failed.");
|
||||
log("reason: " +
|
||||
cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_WIFI));
|
||||
assertTrue(false);
|
||||
}
|
||||
@ -511,13 +502,13 @@ public class ConnectivityManagerMobileTest
|
||||
try {
|
||||
Thread.sleep(ConnectivityManagerTestActivity.SHORT_TIMEOUT);
|
||||
} catch (Exception e) {
|
||||
Log.v(LOG_TAG, "exception: " + e.toString());
|
||||
log("exception: " + e.toString());
|
||||
}
|
||||
|
||||
// Disconnect from the current AP
|
||||
Log.v(LOG_TAG, "disconnect from the AP");
|
||||
log("disconnect from the AP");
|
||||
if (!cmActivity.disconnectAP()) {
|
||||
Log.v(LOG_TAG, "failed to disconnect from " + TEST_ACCESS_POINT);
|
||||
log("failed to disconnect from " + TEST_ACCESS_POINT);
|
||||
}
|
||||
|
||||
// Verify the connectivity state for Wifi is DISCONNECTED
|
||||
@ -525,7 +516,7 @@ public class ConnectivityManagerMobileTest
|
||||
ConnectivityManagerTestActivity.LONG_TIMEOUT));
|
||||
|
||||
if (!cmActivity.disableWifi()) {
|
||||
Log.v(LOG_TAG, "disable Wifi failed");
|
||||
log("disable Wifi failed");
|
||||
return;
|
||||
}
|
||||
assertTrue(cmActivity.waitForWifiState(WifiManager.WIFI_STATE_DISABLED,
|
||||
|
@ -136,7 +136,7 @@ public class WifiConnectionTest
|
||||
|
||||
// step 2: verify Wifi state and network state;
|
||||
assertTrue(mAct.waitForNetworkState(ConnectivityManager.TYPE_WIFI,
|
||||
State.CONNECTED, 2 * ConnectivityManagerTestActivity.LONG_TIMEOUT));
|
||||
State.CONNECTED, 6 * ConnectivityManagerTestActivity.LONG_TIMEOUT));
|
||||
|
||||
// step 3: verify the current connected network is the given SSID
|
||||
assertNotNull("Wifi connection returns null", mAct.mWifiManager.getConnectionInfo());
|
||||
@ -166,8 +166,9 @@ public class WifiConnectionTest
|
||||
String ssid = networks.get(i).SSID;
|
||||
log("-- START Wi-Fi connection test to : " + ssid + " --");
|
||||
connectToWifi(networks.get(i));
|
||||
sleep(2 * ConnectivityManagerTestActivity.SHORT_TIMEOUT,
|
||||
"interruped while waiting for wifi disabled.");
|
||||
// wait for 2 minutes between wifi stop and start
|
||||
sleep(ConnectivityManagerTestActivity.WIFI_START_TIMER,
|
||||
"interruped while connected to wifi");
|
||||
log("-- END Wi-Fi connection test to " + ssid + " -- ");
|
||||
}
|
||||
}
|
||||
|
@ -92,6 +92,9 @@ public class WifiStressTest
|
||||
mPassword = mRunner.mReconnectPassword;
|
||||
mScanIterations = mRunner.mScanIterations;
|
||||
mWifiSleepTime = mRunner.mSleepTime;
|
||||
log(String.format("mReconnectIterations(%d), mSsid(%s), mPassword(%s),"
|
||||
+ "mScanIterations(%d), mWifiSleepTime(%d)", mReconnectIterations, mSsid,
|
||||
mPassword, mScanIterations, mWifiSleepTime));
|
||||
mOutputWriter = new BufferedWriter(new FileWriter(new File(
|
||||
Environment.getExternalStorageDirectory(), OUTPUT_FILE), true));
|
||||
mAct.turnScreenOn();
|
||||
@ -248,6 +251,7 @@ public class WifiStressTest
|
||||
assertTrue("Wi-Fi is connected, but no data connection.", mAct.pingTest(null));
|
||||
|
||||
int i;
|
||||
long sum = 0;
|
||||
for (i = 0; i < mReconnectIterations; i++) {
|
||||
// 1. Put device into sleep mode
|
||||
// 2. Wait for the device to sleep for sometime, verify wi-fi is off and mobile is on.
|
||||
@ -284,12 +288,18 @@ public class WifiStressTest
|
||||
|
||||
// Turn screen on again
|
||||
mAct.turnScreenOn();
|
||||
// Measure the time for Wi-Fi to get connected
|
||||
long startTime = System.currentTimeMillis();
|
||||
assertTrue("Wait for Wi-Fi enable timeout after wake up",
|
||||
mAct.waitForWifiState(WifiManager.WIFI_STATE_ENABLED,
|
||||
ConnectivityManagerTestActivity.SHORT_TIMEOUT));
|
||||
assertTrue("Wait for Wi-Fi connection timeout after wake up",
|
||||
mAct.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED,
|
||||
ConnectivityManagerTestActivity.LONG_TIMEOUT));
|
||||
6 * ConnectivityManagerTestActivity.LONG_TIMEOUT));
|
||||
long connectionTime = System.currentTimeMillis() - startTime;
|
||||
sum += connectionTime;
|
||||
log("average reconnection time is: " + sum/(i+1));
|
||||
|
||||
assertTrue("Reconnect to Wi-Fi network, but no data connection.", mAct.pingTest(null));
|
||||
}
|
||||
if (i == mReconnectIterations) {
|
||||
|
Reference in New Issue
Block a user