Skip to content

Commit

Permalink
reverted to TestCoroutineDispatcher
Browse files Browse the repository at this point in the history
  • Loading branch information
mrehan27 committed Sep 15, 2023
1 parent 5f8db03 commit f24e1ad
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import io.customer.sdk.util.DispatchersProvider
import io.customer.sdk.util.SdkDispatchers
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.StandardTestDispatcher
import kotlinx.coroutines.test.TestCoroutineDispatcher

class DispatchersProviderStub : DispatchersProvider {
private var overrideBackground: CoroutineDispatcher? = null
Expand All @@ -21,9 +21,9 @@ class DispatchersProviderStub : DispatchersProvider {

@OptIn(ExperimentalCoroutinesApi::class)
override val background: CoroutineDispatcher
get() = overrideBackground ?: StandardTestDispatcher()
get() = overrideBackground ?: TestCoroutineDispatcher()

@OptIn(ExperimentalCoroutinesApi::class)
override val main: CoroutineDispatcher
get() = overrideMain ?: StandardTestDispatcher()
get() = overrideMain ?: TestCoroutineDispatcher()
}

0 comments on commit f24e1ad

Please sign in to comment.