Closed david-allison closed 2 weeks ago
Actually... we should do better with that stack trace
ActivityStartupUnderBackupTest > [CardViewerActivity] > activityHandlesRestoreBackup[CardViewerActivity] FAILED
java.lang.IllegalArgumentException: FailOnUnhandledExceptionRule must be applied after AnkiDroidApp.onCreate
at com.ichi2.testutils.FailOnUnhandledExceptionRule$apply$1.evaluate(FailOnUnhandledExceptionRule.kt:45)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.robolectric.RobolectricTestRunner$HelperTestRunner$1.evaluate(RobolectricTestRunner.java:588)
at org.robolectric.internal.SandboxTestRunner$2.lambda$evaluate$2(SandboxTestRunner.java:290)
at org.robolectric.internal.bytecode.Sandbox.lambda$runOnMainThread$0(Sandbox.java:101)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Much better!
Purpose / Description
Previously, an unhandled exception would hang, now it fails
Fixes
Approach
Assert no unhandled exceptions are thrown
How Has This Been Tested?
https://github.com/ankidroid/Anki-Android/actions/runs/8859797884
Checklist