Upgrade to Coroutines 1.3.0-M2
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
package org.springframework.messaging.rsocket
|
||||
|
||||
import io.rsocket.transport.ClientTransport
|
||||
import kotlinx.coroutines.FlowPreview
|
||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.reactive.awaitFirstOrNull
|
||||
import kotlinx.coroutines.reactive.awaitSingle
|
||||
@@ -90,7 +90,7 @@ inline fun <reified T : Any> RSocketRequester.RequestSpec.dataWithType(publisher
|
||||
* @author Sebastien Deleuze
|
||||
* @since 5.2
|
||||
*/
|
||||
@FlowPreview
|
||||
@ExperimentalCoroutinesApi
|
||||
inline fun <reified T : Any> RSocketRequester.RequestSpec.dataWithType(flow: Flow<T>): RSocketRequester.ResponseSpec =
|
||||
data(flow, object : ParameterizedTypeReference<T>() {})
|
||||
|
||||
@@ -120,9 +120,9 @@ suspend inline fun <reified T : Any> RSocketRequester.ResponseSpec.retrieveAndAw
|
||||
* @author Sebastien Deleuze
|
||||
* @since 5.2
|
||||
*/
|
||||
@FlowPreview
|
||||
inline fun <reified T : Any> RSocketRequester.ResponseSpec.retrieveFlow(batchSize: Int = 1): Flow<T> =
|
||||
retrieveFlux(object : ParameterizedTypeReference<T>() {}).asFlow(batchSize)
|
||||
@ExperimentalCoroutinesApi
|
||||
inline fun <reified T : Any> RSocketRequester.ResponseSpec.retrieveFlow(): Flow<T> =
|
||||
retrieveFlux(object : ParameterizedTypeReference<T>() {}).asFlow()
|
||||
|
||||
/**
|
||||
* Extension for [RSocketRequester.ResponseSpec.retrieveMono] providing a `retrieveMono<Foo>()`
|
||||
|
||||
@@ -21,7 +21,7 @@ import io.rsocket.RSocketFactory
|
||||
import io.rsocket.frame.decoder.PayloadDecoder
|
||||
import io.rsocket.transport.netty.server.CloseableChannel
|
||||
import io.rsocket.transport.netty.server.TcpServerTransport
|
||||
import kotlinx.coroutines.FlowPreview
|
||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.flow
|
||||
@@ -49,6 +49,7 @@ import java.time.Duration
|
||||
* @author Sebastien Deleuze
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
@ExperimentalCoroutinesApi
|
||||
class RSocketClientToServerCoroutinesIntegrationTests {
|
||||
|
||||
@Test
|
||||
@@ -104,7 +105,7 @@ class RSocketClientToServerCoroutinesIntegrationTests {
|
||||
.verify(Duration.ofSeconds(5))
|
||||
}
|
||||
|
||||
@FlowPreview
|
||||
@ExperimentalCoroutinesApi
|
||||
@Controller
|
||||
class ServerController {
|
||||
|
||||
@@ -159,7 +160,7 @@ class RSocketClientToServerCoroutinesIntegrationTests {
|
||||
@Configuration
|
||||
open class ServerConfig {
|
||||
|
||||
@FlowPreview
|
||||
@ExperimentalCoroutinesApi
|
||||
@Bean
|
||||
open fun controller(): ServerController {
|
||||
return ServerController()
|
||||
|
||||
@@ -2,7 +2,7 @@ package org.springframework.messaging.rsocket
|
||||
|
||||
import io.mockk.every
|
||||
import io.mockk.mockk
|
||||
import kotlinx.coroutines.FlowPreview
|
||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.toList
|
||||
import kotlinx.coroutines.runBlocking
|
||||
@@ -20,7 +20,7 @@ import java.util.concurrent.CompletableFuture
|
||||
*
|
||||
* @author Sebastien Deleuze
|
||||
*/
|
||||
@FlowPreview
|
||||
@ExperimentalCoroutinesApi
|
||||
class RSocketRequesterExtensionsTests {
|
||||
|
||||
private val stringTypeRefMatcher: (ParameterizedTypeReference<*>) -> Boolean = { it.type == String::class.java }
|
||||
|
||||
Reference in New Issue
Block a user