s3rius
04/04/2023, 9:36 PMDispatchers.setMain(StandardTestDispatcher())
in most of my tests, and this unsurprisingly triggers the MainThreadChecker.
I'm working around it with a custom implementation:
class TestMainThreadChecker : MainThreadChecker {
override fun isMainThread(): Boolean = Thread.currentThread().threadGroup.name.contains("main")
}
But aside from the fact that I'm not even sure this is correct, it sounds like a fairly annoying hurdle for adopters of Decompose.Arkadii Ivanov
04/05/2023, 12:39 AMMainThreadChecker
is an internal API, it shouldn't be used outside of the library.s3rius
04/05/2023, 6:06 PM