[Android] Remove workaround for runblocking calls
Geoffrey Métais
git at videolan.org
Fri Sep 7 17:04:55 CEST 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Sep 7 16:54:24 2018 +0200| [aac79a3430d60ea89c5d6db56305ade92c5677f1] | committer: Geoffrey Métais
Remove workaround for runblocking calls
> https://code.videolan.org/videolan/vlc-android/commit/aac79a3430d60ea89c5d6db56305ade92c5677f1
---
.../org/videolan/vlc/repository/BrowserFavRepositoryTest.kt | 12 +++++-------
.../org/videolan/vlc/repository/DirectoryRepositoryTest.kt | 1 -
.../test/org/videolan/vlc/repository/SlaveRepositoryTest.kt | 1 -
3 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/vlc-android/test/org/videolan/vlc/repository/BrowserFavRepositoryTest.kt b/vlc-android/test/org/videolan/vlc/repository/BrowserFavRepositoryTest.kt
index 7e1c9d6c8..9ab7c3f93 100644
--- a/vlc-android/test/org/videolan/vlc/repository/BrowserFavRepositoryTest.kt
+++ b/vlc-android/test/org/videolan/vlc/repository/BrowserFavRepositoryTest.kt
@@ -20,28 +20,27 @@
package org.videolan.vlc.repository
+import android.arch.core.executor.testing.InstantTaskExecutorRule
import android.arch.lifecycle.MutableLiveData
import android.net.Uri
import kotlinx.coroutines.experimental.runBlocking
import org.hamcrest.CoreMatchers.`is`
+import org.hamcrest.CoreMatchers.hasItem
import org.junit.Assert.assertThat
import org.junit.Before
+import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
+import org.mockito.ArgumentMatchers
import org.mockito.Mockito.*
import org.powermock.api.mockito.PowerMockito
import org.powermock.core.classloader.annotations.PrepareForTest
import org.powermock.modules.junit4.PowerMockRunner
+import org.videolan.vlc.ExternalMonitor
import org.videolan.vlc.database.BrowserFavDao
import org.videolan.vlc.database.MediaDatabase
import org.videolan.vlc.database.models.BrowserFav
import org.videolan.vlc.util.*
-import android.arch.core.executor.testing.InstantTaskExecutorRule
-import org.hamcrest.CoreMatchers.hasItem
-import org.hamcrest.core.AnyOf
-import org.junit.Rule
-import org.mockito.ArgumentMatchers
-import org.videolan.vlc.ExternalMonitor
@RunWith(PowerMockRunner::class)
@@ -57,7 +56,6 @@ class BrowserFavRepositoryTest {
private lateinit var browserFavRepository: BrowserFavRepository
@Before
fun init() {
- System.setProperty("kotlinx.coroutines.blocking.checker", "disable")
val db = mock<MediaDatabase>()
`when`(db.browserFavDao()).thenReturn(browserFavDao)
browserFavRepository = BrowserFavRepository(browserFavDao)
diff --git a/vlc-android/test/org/videolan/vlc/repository/DirectoryRepositoryTest.kt b/vlc-android/test/org/videolan/vlc/repository/DirectoryRepositoryTest.kt
index 063f9fcf0..ceae77c2d 100644
--- a/vlc-android/test/org/videolan/vlc/repository/DirectoryRepositoryTest.kt
+++ b/vlc-android/test/org/videolan/vlc/repository/DirectoryRepositoryTest.kt
@@ -28,7 +28,6 @@ class DirectoryRepositoryTest {
val instantExecutorRule = InstantTaskExecutorRule()
@Before fun init() {
- System.setProperty("kotlinx.coroutines.blocking.checker", "disable")
val db = mock<MediaDatabase>()
`when`(db.customDirectoryDao()).thenReturn(customDirectoryDao)
directoryRepository = DirectoryRepository(customDirectoryDao)
diff --git a/vlc-android/test/org/videolan/vlc/repository/SlaveRepositoryTest.kt b/vlc-android/test/org/videolan/vlc/repository/SlaveRepositoryTest.kt
index 5489508c3..fec29d343 100644
--- a/vlc-android/test/org/videolan/vlc/repository/SlaveRepositoryTest.kt
+++ b/vlc-android/test/org/videolan/vlc/repository/SlaveRepositoryTest.kt
@@ -54,7 +54,6 @@ class SlaveRepositoryTest {
val instantExecutorRule = InstantTaskExecutorRule()
@Before fun init() {
- System.setProperty("kotlinx.coroutines.blocking.checker", "disable")
val db = mock<MediaDatabase>()
`when`(db.slaveDao()).thenReturn(slaveDao)
slaveRepository = SlaveRepository(slaveDao)
More information about the Android
mailing list