Temporarily disable rsocket-routing-broker integration
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<rsocket-routing.version>0.0.2-SNAPSHOT</rsocket-routing.version>
|
<!-- <rsocket-routing.version>0.0.2-SNAPSHOT</rsocket-routing.version> -->
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@@ -42,12 +42,12 @@
|
|||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-function-context</artifactId>
|
<artifactId>spring-cloud-function-context</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<!-- <dependency> -->
|
||||||
<groupId>io.rsocket.routing</groupId>
|
<!-- <groupId>io.rsocket.routing</groupId> -->
|
||||||
<artifactId>rsocket-routing-client-spring</artifactId>
|
<!-- <artifactId>rsocket-routing-client-spring</artifactId> -->
|
||||||
<version>${rsocket-routing.version}</version>
|
<!-- <version>${rsocket-routing.version}</version> -->
|
||||||
<optional>true</optional>
|
<!-- <optional>true</optional> -->
|
||||||
</dependency>
|
<!-- </dependency> -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||||
@@ -63,12 +63,12 @@
|
|||||||
<artifactId>reactor-test</artifactId>
|
<artifactId>reactor-test</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<!-- <dependency> -->
|
||||||
<groupId>io.rsocket.routing</groupId>
|
<!-- <groupId>io.rsocket.routing</groupId> -->
|
||||||
<artifactId>rsocket-routing-broker-spring</artifactId>
|
<!-- <artifactId>rsocket-routing-broker-spring</artifactId> -->
|
||||||
<version>${rsocket-routing.version}</version>
|
<!-- <version>${rsocket-routing.version}</version> -->
|
||||||
<scope>test</scope>
|
<!-- <scope>test</scope> -->
|
||||||
</dependency>
|
<!-- </dependency> -->
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -16,15 +16,6 @@
|
|||||||
|
|
||||||
package org.springframework.cloud.function.rsocket;
|
package org.springframework.cloud.function.rsocket;
|
||||||
|
|
||||||
import io.rsocket.routing.client.spring.RoutingClientAutoConfiguration;
|
|
||||||
|
|
||||||
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
|
|
||||||
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
|
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
|
||||||
import org.springframework.cloud.function.context.FunctionProperties;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.messaging.rsocket.RSocketConnectorConfigurer;
|
import org.springframework.messaging.rsocket.RSocketConnectorConfigurer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -34,14 +25,14 @@ import org.springframework.messaging.rsocket.RSocketConnectorConfigurer;
|
|||||||
* @author Spencer Gibb
|
* @author Spencer Gibb
|
||||||
* @since 3.1
|
* @since 3.1
|
||||||
*/
|
*/
|
||||||
@Configuration(proxyBeanMethods = false)
|
//@Configuration(proxyBeanMethods = false)
|
||||||
@ConditionalOnClass(RoutingClientAutoConfiguration.class)
|
//@ConditionalOnClass(RoutingClientAutoConfiguration.class)
|
||||||
@ConditionalOnProperty(name = FunctionProperties.PREFIX + ".rsocket.enabled", matchIfMissing = true)
|
//@ConditionalOnProperty(name = FunctionProperties.PREFIX + ".rsocket.enabled", matchIfMissing = true)
|
||||||
@AutoConfigureBefore(RoutingClientAutoConfiguration.class)
|
//@AutoConfigureBefore(RoutingClientAutoConfiguration.class)
|
||||||
@AutoConfigureAfter(RSocketAutoConfiguration.class)
|
//@AutoConfigureAfter(RSocketAutoConfiguration.class)
|
||||||
class RSocketRoutingAutoConfiguration {
|
class RSocketRoutingAutoConfiguration {
|
||||||
|
|
||||||
@Bean
|
// @Bean
|
||||||
public RSocketConnectorConfigurer functionRSocketConnectorConfigurer(
|
public RSocketConnectorConfigurer functionRSocketConnectorConfigurer(
|
||||||
FunctionRSocketMessageHandler handler) {
|
FunctionRSocketMessageHandler handler) {
|
||||||
return connector -> connector.acceptor(handler.responder());
|
return connector -> connector.acceptor(handler.responder());
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ package org.springframework.cloud.function.rsocket;
|
|||||||
|
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
import io.rsocket.routing.client.spring.RoutingMetadata;
|
|
||||||
import org.junit.jupiter.api.AfterEach;
|
import org.junit.jupiter.api.AfterEach;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import reactor.core.publisher.Mono;
|
import reactor.core.publisher.Mono;
|
||||||
import reactor.test.StepVerifier;
|
import reactor.test.StepVerifier;
|
||||||
@@ -39,6 +39,7 @@ import org.springframework.util.SocketUtils;
|
|||||||
* @author Oleg Zhurakousky
|
* @author Oleg Zhurakousky
|
||||||
* @since 3.1
|
* @since 3.1
|
||||||
*/
|
*/
|
||||||
|
@Disabled
|
||||||
public class RoutingBrokerTests {
|
public class RoutingBrokerTests {
|
||||||
|
|
||||||
ConfigurableApplicationContext functionContext;
|
ConfigurableApplicationContext functionContext;
|
||||||
@@ -77,19 +78,19 @@ public class RoutingBrokerTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testRoutingWithMessage() throws Exception {
|
public void testRoutingWithMessage() throws Exception {
|
||||||
this.setup(false);
|
// this.setup(false);
|
||||||
RSocketRequester requester = clientContext.getBean(RSocketRequester.class);
|
// RSocketRequester requester = clientContext.getBean(RSocketRequester.class);
|
||||||
RoutingMetadata metadata = clientContext.getBean(RoutingMetadata.class);
|
// RoutingMetadata metadata = clientContext.getBean(RoutingMetadata.class);
|
||||||
Mono<String> result = requester.route("uppercase") // used to find function
|
// Mono<String> result = requester.route("uppercase") // used to find function
|
||||||
.metadata(metadata.address("samplefn"))
|
// .metadata(metadata.address("samplefn"))
|
||||||
.data("\"hello\"")
|
// .data("\"hello\"")
|
||||||
.retrieveMono(String.class);
|
// .retrieveMono(String.class);
|
||||||
|
//
|
||||||
StepVerifier
|
// StepVerifier
|
||||||
.create(result)
|
// .create(result)
|
||||||
.expectNext("HELLO")
|
// .expectNext("HELLO")
|
||||||
.expectComplete()
|
// .expectComplete()
|
||||||
.verify();
|
// .verify();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setup(boolean routingWithProperty) {
|
private void setup(boolean routingWithProperty) {
|
||||||
|
|||||||
Reference in New Issue
Block a user