File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed
paging/paging-common/src/test/kotlin/androidx/paging
testutils/testutils-paging
src/main/java/androidx/paging Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -2054,7 +2054,7 @@ class PagingDataDifferTest(
20542054 pagingSourceFactory = {
20552055 TestPagingSource (
20562056 loadDelay = 0,
2057- loadDispatcher = loadDispatcher,
2057+ loadContext = loadDispatcher,
20582058 ).also { pagingSources.add(it) }
20592059 }
20602060 ),
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ plugins {
2525dependencies {
2626 api(libs. kotlinStdlib)
2727 implementation(project(" :paging:paging-common" ))
28- implementation(project(" :internal-testutils-ktx" ))
2928 implementation(libs. kotlinTest)
3029}
3130
Original file line number Diff line number Diff line change 1616
1717package androidx.paging
1818
19- import androidx.testutils.DirectDispatcher
20- import kotlinx .coroutines.CoroutineDispatcher
19+ import kotlin.coroutines.CoroutineContext
20+ import kotlin .coroutines.EmptyCoroutineContext
2121import kotlinx.coroutines.delay
2222import kotlinx.coroutines.withContext
2323
@@ -33,7 +33,7 @@ class TestPagingSource(
3333 override val jumpingSupported : Boolean = true ,
3434 val items : List <Int > = ITEMS ,
3535 private val loadDelay : Long = 1000 ,
36- private val loadDispatcher : CoroutineDispatcher = DirectDispatcher ,
36+ private val loadContext : CoroutineContext = EmptyCoroutineContext ,
3737 private val placeholdersEnabled : Boolean = true ,
3838) : PagingSource<Int, Int>() {
3939 var errorNextLoad = false
@@ -60,7 +60,7 @@ class TestPagingSource(
6060 // execution of events.
6161 delay(loadDelay)
6262
63- return withContext(loadDispatcher ) { getLoadResult(params) }
63+ return withContext(loadContext ) { getLoadResult(params) }
6464 }
6565
6666 private fun getLoadResult (params : LoadParams <Int >): LoadResult <Int , Int > {
You can’t perform that action at this time.
0 commit comments