Commit f67dcf4
committed
Delete WhiteboardDefaultForegroundColorTest to fix workflow failure on windows
It was proposed to use runTest for the test method in this class but
doing this triggers:
java.lang.RuntimeException: Can't create handler inside thread Thread[DefaultDispatcher-worker-1 @coroutine#7,5,SDK 33] that has not called Looper.prepare()
at android.os.Handler.__constructor__(Handler.java:227)
at android.os.Handler.<init>(Handler.java)
at android.view.GestureDetector$GestureHandler.<init>(GestureDetector.java)
at android.view.GestureDetector.__constructor__(GestureDetector.java:423)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.robolectric.util.ReflectionHelpers.callInstanceMethod(ReflectionHelpers.java:315)
at org.robolectric.internal.bytecode.ShadowImpl.invokeConstructor(ShadowImpl.java:73)
at org.robolectric.shadow.api.Shadow.invokeConstructor(Shadow.java:75)
at org.robolectric.shadows.ShadowGestureDetector.__constructor__(ShadowGestureDetector.java:32)
at android.view.GestureDetector.<init>(GestureDetector.java)
at com.ichi2.anki.AbstractFlashcardViewer.initLayout(AbstractFlashcardViewer.kt:866)
at com.ichi2.anki.Reviewer.initLayout(Reviewer.kt:1092)
at com.ichi2.anki.AbstractFlashcardViewer.onCollectionLoaded(AbstractFlashcardViewer.kt:535)
at com.ichi2.anki.Reviewer.onCollectionLoaded(Reviewer.kt:314)
at com.ichi2.anki.AnkiActivity.startLoadingCollection$lambda$0(AnkiActivity.kt:287)
at com.ichi2.async.CollectionLoader$load$1.invokeSuspend(CollectionLoader.kt:51)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:363)
at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith$default(DispatchedContinuation.kt:274)
at kotlinx.coroutines.DispatchedCoroutine.afterResume(Builders.common.kt:257)
at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:99)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)
Suppressed: org.robolectric.android.internal.AndroidTestEnvironment$UnExecutedRunnablesException: Main looper has queued unexecuted runnables. This might be the cause of the test failure. You might need a shadowOf(Looper.getMainLooper()).idle() call.
See PR ankidroid#162641 parent a06ab46 commit f67dcf4
1 file changed
Lines changed: 0 additions & 54 deletions
Lines changed: 0 additions & 54 deletions
This file was deleted.
0 commit comments