From 104fd51f871d99cb7ccf64ff0decc6071b7d2630 Mon Sep 17 00:00:00 2001 From: Paul Stewart Date: Wed, 16 Mar 2016 09:44:34 -0700 Subject: [PATCH] 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 --- tests/cts/net/src/android/net/wifi/cts/WifiManagerTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/cts/net/src/android/net/wifi/cts/WifiManagerTest.java b/tests/cts/net/src/android/net/wifi/cts/WifiManagerTest.java index 55fd1f5722..5497454bfd 100644 --- a/tests/cts/net/src/android/net/wifi/cts/WifiManagerTest.java +++ b/tests/cts/net/src/android/net/wifi/cts/WifiManagerTest.java @@ -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