bj012/08/2017, 4:20 PM
you can just use a
while / try / receive
. As for testing,
is generally used to make the function wait until the coroutines are done.
koufa12/09/2017, 11:06 AM
to not have to handle the close excpetion myself. But the question how to test this remains. I am using
but I have an issue regarding the timing of mocking
events to the
and the assertion on the
instance. @elizarov Do you have some suggestion on this?
and after the mocked
calls I use
and it works. I didnt knew that
waits all items to be consumed before closing the channel