Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d3c2f0c authored by Xia Wang's avatar Xia Wang
Browse files

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
parent d65a4f62
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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()) {