WifiManagerTest#testWifiWatchdog: Disambiguate failures

There is nothing in the WifiWatchdog test that supports the
assumption that the device under test is pre-configured with a
working WiFi network configuration.  This CL makes it possible
from the test stack trace whether the test failed at the
beginning or during the reconnections.

Bug: 27638295
Change-Id: Iff1bd398c74076fb1a969741818562ea582e868e
This commit is contained in:
Paul Stewart
2016-03-16 09:44:34 -07:00
parent 604deb783c
commit 104fd51f87

View File

@@ -484,6 +484,9 @@ public class WifiManagerTest extends AndroidTestCase {
}
assertTrue(mWifiManager.isWifiEnabled());
// This will generate a distinct stack trace if the initial connection fails.
connectWifi();
int i = 0;
for (; i < 15; i++) {
// Wait for a WiFi connection