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

matthew graf

07/14/2020, 10:39 PM
When testing suspend functions, does anyone have advice on whether to use
runBlockingTest
vs
runBlocking
?
runBlockingTest
seems to have some nice features, but this line in the documentation makes it sound like there is some risk of deprecation
Copy code
This API is experimental and it is may change before migrating out of experimental (while it is marked as @ExperimentalCoroutinesApi). Changes during experimental may have deprecation applied when possible, but it is not advised to use the API in stable code before it leaves experimental due to possible breaking changes.
g

gildor

07/14/2020, 11:49 PM
It's not a risk of deprecated, it's a risk of possible changes of this api Usually it's completely fine use experimental api for applications and especially tests. Only libraries should be careful (because it may also break compatibility of library if this api will change)
👍🏾 1
m

matthew graf

07/15/2020, 11:44 PM
Got it. Thanks!
3 Views