Merge "Add sleep to avoid calling stopLocalOnlyHotspot before TetherController initialization." into pie-cts-dev am: 4d452396c9
am: 7a1ba7cace
Change-Id: Iebd363448d1b05f1c4b8b4b35a3a56cc466e1991
This commit is contained in:
@@ -874,6 +874,15 @@ public class WifiManagerTest extends AndroidTestCase {
|
|||||||
|
|
||||||
TestLocalOnlyHotspotCallback callback = startLocalOnlyHotspot();
|
TestLocalOnlyHotspotCallback callback = startLocalOnlyHotspot();
|
||||||
|
|
||||||
|
// add sleep to avoid calling stopLocalOnlyHotspot before TetherController initialization.
|
||||||
|
// TODO: remove this sleep as soon as b/124330089 is fixed.
|
||||||
|
try {
|
||||||
|
Log.d(TAG, "Sleep for 2 seconds");
|
||||||
|
Thread.sleep(2000);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
Log.d(TAG, "Thread InterruptedException!");
|
||||||
|
}
|
||||||
|
|
||||||
stopLocalOnlyHotspot(callback, wifiEnabled);
|
stopLocalOnlyHotspot(callback, wifiEnabled);
|
||||||
|
|
||||||
// wifi should either stay on, or come back on
|
// wifi should either stay on, or come back on
|
||||||
@@ -949,6 +958,15 @@ public class WifiManagerTest extends AndroidTestCase {
|
|||||||
}
|
}
|
||||||
assertTrue(caughtException);
|
assertTrue(caughtException);
|
||||||
|
|
||||||
|
// add sleep to avoid calling stopLocalOnlyHotspot before TetherController initialization.
|
||||||
|
// TODO: remove this sleep as soon as b/124330089 is fixed.
|
||||||
|
try {
|
||||||
|
Log.d(TAG, "Sleep for 2 seconds");
|
||||||
|
Thread.sleep(2000);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
Log.d(TAG, "Thread InterruptedException!");
|
||||||
|
}
|
||||||
|
|
||||||
stopLocalOnlyHotspot(callback, wifiEnabled);
|
stopLocalOnlyHotspot(callback, wifiEnabled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user