Loading core/tests/coretests/src/android/os/HandlerThreadTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -126,7 +126,7 @@ public class HandlerThreadTest { public void testUncaughtExceptionFails() throws Exception { // For the moment we can only test Ravenwood; on a physical device uncaught exceptions // are detected, but reported as test failures at a higher level where we can't inspect Assume.assumeTrue(RavenwoodRule.isOnRavenwood()); Assume.assumeTrue(false); // TODO: re-enable mThrown.expect(IllegalStateException.class); final HandlerThread thread = new HandlerThread("HandlerThreadTest"); Loading ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuleImpl.java +12 −3 Original line number Diff line number Diff line Loading @@ -57,6 +57,11 @@ public class RavenwoodRuleImpl { private static ScheduledFuture<?> sPendingTimeout; /** * When enabled, attempt to detect uncaught exceptions from background threads. */ private static final boolean ENABLE_UNCAUGHT_EXCEPTION_DETECTION = false; /** * When set, an unhandled exception was discovered (typically on a background thread), and we * capture it here to ensure it's reported as a test failure. Loading @@ -75,8 +80,10 @@ public class RavenwoodRuleImpl { } public static void init(RavenwoodRule rule) { if (ENABLE_UNCAUGHT_EXCEPTION_DETECTION) { maybeThrowPendingUncaughtException(false); Thread.setDefaultUncaughtExceptionHandler(sUncaughtExceptionHandler); } RuntimeInit.redirectLogStreams(); Loading Loading @@ -129,8 +136,10 @@ public class RavenwoodRuleImpl { android.os.Binder.reset$ravenwood(); android.os.Process.reset$ravenwood(); if (ENABLE_UNCAUGHT_EXCEPTION_DETECTION) { maybeThrowPendingUncaughtException(true); } } public static void logTestRunner(String label, Description description) { // This message string carefully matches the exact format emitted by on-device tests, to Loading Loading
core/tests/coretests/src/android/os/HandlerThreadTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -126,7 +126,7 @@ public class HandlerThreadTest { public void testUncaughtExceptionFails() throws Exception { // For the moment we can only test Ravenwood; on a physical device uncaught exceptions // are detected, but reported as test failures at a higher level where we can't inspect Assume.assumeTrue(RavenwoodRule.isOnRavenwood()); Assume.assumeTrue(false); // TODO: re-enable mThrown.expect(IllegalStateException.class); final HandlerThread thread = new HandlerThread("HandlerThreadTest"); Loading
ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuleImpl.java +12 −3 Original line number Diff line number Diff line Loading @@ -57,6 +57,11 @@ public class RavenwoodRuleImpl { private static ScheduledFuture<?> sPendingTimeout; /** * When enabled, attempt to detect uncaught exceptions from background threads. */ private static final boolean ENABLE_UNCAUGHT_EXCEPTION_DETECTION = false; /** * When set, an unhandled exception was discovered (typically on a background thread), and we * capture it here to ensure it's reported as a test failure. Loading @@ -75,8 +80,10 @@ public class RavenwoodRuleImpl { } public static void init(RavenwoodRule rule) { if (ENABLE_UNCAUGHT_EXCEPTION_DETECTION) { maybeThrowPendingUncaughtException(false); Thread.setDefaultUncaughtExceptionHandler(sUncaughtExceptionHandler); } RuntimeInit.redirectLogStreams(); Loading Loading @@ -129,8 +136,10 @@ public class RavenwoodRuleImpl { android.os.Binder.reset$ravenwood(); android.os.Process.reset$ravenwood(); if (ENABLE_UNCAUGHT_EXCEPTION_DETECTION) { maybeThrowPendingUncaughtException(true); } } public static void logTestRunner(String label, Description description) { // This message string carefully matches the exact format emitted by on-device tests, to Loading