Android Test Room + Paging 3 +flow Test Has Different Result On Each Run
Paging 3, with Room. I have created an app just like the sample here and start writing test for it. Here is what I have in DAO : @Query('SELECT * FROM Model') fun getModels(): Pagi
Solution 1:
I believe you need to wait for invalidation to happen, which is triggered via InvalidationTracker
from Room's end on insert.
Room uses the ArchTaskExecutors by default, which you can override via RoomDatabase Builder or make synchronous with the helpful InstantTaskExecutorRule
@get:Rule
val instantRule = InstantTaskExecutorRule()
Post a Comment for "Android Test Room + Paging 3 +flow Test Has Different Result On Each Run"