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
Granted, I am new to Kotlin and, by extension, some of the coroutine and flow paradigms in the language, but I have been running into a roadblock for the past few days with the use of .await() in tests. I have been trying to write an integration test for the repository layer of an Android app that verifies, given a running local Firestore emulator, when populated with certain values, then calling the repository method will return a subset of those values. My tests hang indefinitely, and I have narrowed it down to the .await() extension function (not the Tasks.await() method).
I have created a repo that shows the problem I am having. A part of me believes that perhaps this recently worked on issue may fix the problem I am experiencing, but it hasn't been released yet, and it is marked as an "Enhancement" and not a "Bug Fix".
I am trying to see:
If there is some bug with the use of .await() in tests. Perhaps the runBlocking Coroutine Scope doesn't "play" nicely with .await(), which would be a shame, since the Android community is taught to use this (or runBlockingTest) in tests.
If there is not a bug, how would one test such code with .await()? I have a lot of difficulty finding examples online of tests that use .await() within a runBlocking context.
The text was updated successfully, but these errors were encountered:
Granted, I am new to Kotlin and, by extension, some of the coroutine and flow paradigms in the language, but I have been running into a roadblock for the past few days with the use of
.await()
in tests. I have been trying to write an integration test for the repository layer of an Android app that verifies, given a running local Firestore emulator, when populated with certain values, then calling the repository method will return a subset of those values. My tests hang indefinitely, and I have narrowed it down to the.await()
extension function (not theTasks.await()
method).I have created a repo that shows the problem I am having. A part of me believes that perhaps this recently worked on issue may fix the problem I am experiencing, but it hasn't been released yet, and it is marked as an "Enhancement" and not a "Bug Fix".
I am trying to see:
.await()
in tests. Perhaps therunBlocking
Coroutine Scope doesn't "play" nicely with.await()
, which would be a shame, since the Android community is taught to use this (orrunBlockingTest
) in tests..await()
? I have a lot of difficulty finding examples online of tests that use.await()
within arunBlocking
context.The text was updated successfully, but these errors were encountered: