diff options
author | Xia Wang <xiaw@google.com> | 2012-03-09 17:38:31 -0800 |
---|---|---|
committer | Xia Wang <xiaw@google.com> | 2012-03-12 13:58:45 -0700 |
commit | 6d3c2f0cad85b5f618d0bdbf3e9ca659768a47f0 (patch) | |
tree | ad338866e3e00ec7a49e3256f1bb09b1d9674f5f /core/tests/ConnectivityManagerTest | |
parent | d65a4f62fe641cfa485663b162b6f10aa74e3665 (diff) | |
download | frameworks_base-6d3c2f0cad85b5f618d0bdbf3e9ca659768a47f0.zip frameworks_base-6d3c2f0cad85b5f618d0bdbf3e9ca659768a47f0.tar.gz frameworks_base-6d3c2f0cad85b5f618d0bdbf3e9ca659768a47f0.tar.bz2 |
Fix test flakiness
Disable soft AP before start the wifi stress test.
If soft AP test failed with AP enabled, the wifi client can not be
enabled.
Change-Id: Ie6950f6b5b662727f2e811d9b81aeb0f4f7cda91
Diffstat (limited to 'core/tests/ConnectivityManagerTest')
-rw-r--r-- | core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiStressTest.java | 5 |
1 files changed, 5 insertions, 0 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 f46546f..649ec3e 100644 --- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiStressTest.java +++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiStressTest.java @@ -97,6 +97,11 @@ public class WifiStressTest mOutputWriter = new BufferedWriter(new FileWriter(new File( Environment.getExternalStorageDirectory(), OUTPUT_FILE), true)); mAct.turnScreenOn(); + if (mAct.mWifiManager.isWifiApEnabled()) { + // if soft AP is enabled, disable it + assertTrue(mAct.mWifiManager.setWifiApEnabled(null, false)); + Log.v(TAG, "disable soft ap"); + } if (!mAct.mWifiManager.isWifiEnabled()) { log("Enable wi-fi before stress tests."); if (!mAct.enableWifi()) { |