https://kotlinlang.org logo
#coroutines
Title
# coroutines
c

christophsturm

11/07/2018, 4:46 PM
why is TestCoroutineContext marked as obsolete?
s

streetsofboston

11/07/2018, 4:48 PM
Is it? (that was my contribution to Kotlin 😞 )
e

elizarov

11/07/2018, 4:50 PM
It will be reworked to structured concurrency and will become test scope.
s

streetsofboston

11/07/2018, 4:50 PM
Ah!!! 🙂 It’ll be made much better. Thanks!
e

elizarov

11/07/2018, 4:51 PM
Yes
c

christophsturm

11/07/2018, 4:52 PM
is there a blocking scope that i can use to inject into classes that i test and make them run like they were invoked with runBlocking?
i have some classes that implement interfaces that are not suspending, so they have their own coroutine scope and use scope.launch {}. but in my tests it would be nice to run them blocking, or to be able to wait on the scope
d

Dmytro Danylyk

11/08/2018, 5:39 AM
@christophsturm currently there is no such thing, I have created https://github.com/Kotlin/kotlinx.coroutines/issues/810
c

christophsturm

11/08/2018, 8:04 AM
thanks!
6 Views