Hello! I try to start/launch a Kotlin Flow from Groovy/Spock. The Flow I want to test is created by a Kotlin function. This is what I roughly try to achieve:
I have found this SO post but haven't discovered a simpler solution, yet. Can someone please help me out? Thanks!
Christian S.
01/29/2021, 9:08 PM
Hello @elizarov, is there a way to start Kotlin Flows from non-Kotlin code (e.g. using Java/Groovy) and if so, how?
e
elizarov
03/01/2021, 7:46 AM
Yes, you can convert a flow to some Java-friendly reactive type that does not rely on coroutines. We do provide a bunch of converts (to Rx, to project Reactor, and to Java 9 flows).