Fix kotlin coroutines test latest deps
MODIFY
instrumentation/kotlinx-coroutines/javaagent/src/test/kotlin/KotlinCoroutineTests.kt
instrumentation/kotlinx-coroutines/javaagent/src/test/kotlin/KotlinCoroutineTests.kt
@@ -17,6 +17,7 @@ import kotlinx.coroutines.channels.produce
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.consumeAsFlow
+import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.selects.select
@@ -37,9 +38,9 @@ class KotlinCoroutineTests(private val dispatcher: CoroutineDispatcher) {
}
}
- producer.consumeAsFlow().collect {
+ producer.consumeAsFlow().onEach {
tracedChild("consume_$it")
- }
+ }.collect()
}
fun tracePreventedByCancellation() {

Fix kotlin coroutines test latest deps (#4873)