Skip to content

Commit

Permalink
update libs
Browse files Browse the repository at this point in the history
  • Loading branch information
softartdev committed May 17, 2023
1 parent 3153278 commit 1bf8857
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import app.cash.turbine.test
import com.softartdev.notedelight.MainActivity
import com.softartdev.notedelight.shared.data.NoteUseCase
import com.softartdev.notedelight.shared.db.Note
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.runTest
import leakcanary.DetectLeaksAfterTestSuccess
import leakcanary.TestDescriptionHolder
Expand All @@ -18,6 +17,7 @@ import org.junit.Test
import org.junit.rules.RuleChain
import org.junit.runner.RunWith
import org.koin.java.KoinJavaComponent
import kotlin.time.Duration.Companion.minutes

@FlakyTest
@RunWith(AndroidJUnit4::class)
Expand All @@ -33,8 +33,7 @@ class PrepopulateDatabaseTest {
private val noteUseCase: NoteUseCase by KoinJavaComponent.inject(NoteUseCase::class.java)

@Test
@OptIn(ExperimentalCoroutinesApi::class)
fun prepopulateDatabase() = runTest {
fun prepopulateDatabase() = runTest(timeout = 1.minutes) {
noteUseCase.getNotes().test {
var notes: List<Note> = awaitItem()
assertEquals(0, notes.size)
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ targetSdk = "33"
minSdk = "21"

kotlin = "1.8.20"
coroutines = "1.6.4"
coroutines = "1.7.1"
sqlDelight = "1.5.5"
androidxSqlite = "2.3.1"
saferoom = "1.3.0"
Expand All @@ -30,7 +30,7 @@ firebase = "32.0.0"
leakCanary = "2.10"
junit = "4.13.2"
mockito = "5.2.0"
turbine = "0.12.3"
turbine = "0.13.0"
espresso = "3.5.1"
desugar = "2.0.3"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ abstract class BaseViewModel<T> : KmmViewModel() {
useIdling: Boolean = true,
block: suspend CoroutineScope.() -> T
) {
viewModelScope.launch(Dispatchers.Default) {
viewModelScope.launch(Dispatchers.IO) {
try {
if (useIdling) {
IdlingResource.increment()
Expand Down

0 comments on commit 1bf8857

Please sign in to comment.