Catch Throwable instead of Exception.
AssertionFailedError is a Throwable and hence some logs which will
help debug the failures are not printed.
Bug: 38384021
Test: Verified that when the test throws AssertionFailedError, required
logs are printed.
Change-Id: I6cc8e0172b8e30d268a50bdf9281d6828fc74810
This commit is contained in:
@@ -812,7 +812,7 @@ abstract class AbstractRestrictBackgroundNetworkTestCase extends Instrumentation
|
||||
executeSilentShellCommand("am set-inactive " + TEST_APP2_PKG + " " + enabled );
|
||||
try {
|
||||
assertAppIdle(enabled); // Sanity check
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
final String afterStats = getUsageStatsDump();
|
||||
Log.d(TAG, "UsageStats before:\n" + beforeStats);
|
||||
Log.d(TAG, "UsageStats after:\n" + afterStats);
|
||||
|
||||
Reference in New Issue
Block a user