You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core-kotlin-modules/core-kotlin-concurrency-3/src/test/java/com/baeldung/singlerxjavatocoroutinedeferred/SingleRxJavaToCoroutineDeferredUnitTest.kt
+5-16Lines changed: 5 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -40,29 +40,22 @@ class SingleRxJavaToCoroutineDeferredUnitTest {
40
40
41
41
@Test
42
42
fun`using async and blockingGet`() = runBlocking {
43
-
val deferred =
44
-
async { getFilteredProducts().blockingGet() } // potentially blocking main thread while not careful
45
-
deferred.assertOver500AndSorted() // assertion test
43
+
val deferred = async { getFilteredProducts().blockingGet() }
44
+
deferred.assertOver500AndSorted()
46
45
}
47
46
48
47
@Test
49
48
fun`using subscribe and CompletableDeferred`() = runBlocking {
50
49
val deferred =CompletableDeferred<List<Product>>()
0 commit comments