From 6f2098ad71cfc0fcb3e498de7264730bfcf75fb3 Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Wed, 29 Jul 2020 14:39:37 +0200 Subject: [PATCH] Upgrade to Spring Framework 5.3.0-SNAPSHOT This commit also switches to RSocket SNAPSHOTs and updates the repository configuration to rely on "libs-snapshot", since the RSocket SNAPSHOTs are mirrored there. See gh-22640 --- build.gradle | 2 +- buildSrc/src/main/resources/effective-bom-settings.xml | 2 +- .../rsocket/RSocketWebSocketNettyRouteProviderTests.java | 2 +- spring-boot-project/spring-boot-dependencies/build.gradle | 4 ++-- .../boot/rsocket/netty/NettyRSocketServerFactoryTests.java | 6 +++--- .../smoketest/rsocket/SampleRSocketApplicationTests.java | 6 ++---- 6 files changed, 10 insertions(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index cbcaca5181..c48fc32201 100644 --- a/build.gradle +++ b/build.gradle @@ -21,7 +21,7 @@ allprojects { maven { url "https://repo.spring.io/milestone" } } if (version.endsWith('-SNAPSHOT')) { - maven { url "https://repo.spring.io/snapshot" } + maven { url "https://repo.spring.io/libs-snapshot" } } } diff --git a/buildSrc/src/main/resources/effective-bom-settings.xml b/buildSrc/src/main/resources/effective-bom-settings.xml index d67307453c..8db3cd263e 100644 --- a/buildSrc/src/main/resources/effective-bom-settings.xml +++ b/buildSrc/src/main/resources/effective-bom-settings.xml @@ -9,7 +9,7 @@ spring-snapshot - https://repo.spring.io/snapshot + https://repo.spring.io/libs-snapshot true diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/rsocket/RSocketWebSocketNettyRouteProviderTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/rsocket/RSocketWebSocketNettyRouteProviderTests.java index 3c1947c6f3..24845d0c06 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/rsocket/RSocketWebSocketNettyRouteProviderTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/rsocket/RSocketWebSocketNettyRouteProviderTests.java @@ -87,7 +87,7 @@ class RSocketWebSocketNettyRouteProviderTests { int port = server.getPort(); RSocketRequester.Builder builder = context.getBean(RSocketRequester.Builder.class); return builder.dataMimeType(MediaType.APPLICATION_CBOR) - .connectWebSocket(URI.create("ws://localhost:" + port + "/rsocket")).block(); + .websocket(URI.create("ws://localhost:" + port + "/rsocket")); } @Configuration(proxyBeanMethods = false) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index b933efa0d1..a56f4e421b 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1350,7 +1350,7 @@ bom { ] } } - library("RSocket", "1.0.1") { + library("RSocket", "1.1.0-SNAPSHOT") { group("io.rsocket") { imports = [ "rsocket-bom" @@ -1570,7 +1570,7 @@ bom { ] } } - library("Spring Framework", "5.3.0-M1") { + library("Spring Framework", "5.3.0-SNAPSHOT") { group("org.springframework") { imports = [ "spring-framework-bom" diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/rsocket/netty/NettyRSocketServerFactoryTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/rsocket/netty/NettyRSocketServerFactoryTests.java index 89ae9a827b..c62cc254fb 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/rsocket/netty/NettyRSocketServerFactoryTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/rsocket/netty/NettyRSocketServerFactoryTests.java @@ -76,7 +76,7 @@ class NettyRSocketServerFactoryTests { } } if (this.requester != null) { - this.requester.rsocket().dispose(); + this.requester.rsocketClient().dispose(); } } @@ -166,13 +166,13 @@ class NettyRSocketServerFactoryTests { private RSocketRequester createRSocketTcpClient() { Assertions.assertThat(this.server).isNotNull(); InetSocketAddress address = this.server.address(); - return createRSocketRequesterBuilder().connectTcp(address.getHostString(), address.getPort()).block(); + return createRSocketRequesterBuilder().tcp(address.getHostString(), address.getPort()); } private RSocketRequester createRSocketWebSocketClient() { Assertions.assertThat(this.server).isNotNull(); InetSocketAddress address = this.server.address(); - return createRSocketRequesterBuilder().connect(WebsocketClientTransport.create(address)).block(); + return createRSocketRequesterBuilder().transport(WebsocketClientTransport.create(address)); } private RSocketRequester.Builder createRSocketRequesterBuilder() { diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-rsocket/src/test/java/smoketest/rsocket/SampleRSocketApplicationTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-rsocket/src/test/java/smoketest/rsocket/SampleRSocketApplicationTests.java index b7d38bb1c7..493b308a77 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-rsocket/src/test/java/smoketest/rsocket/SampleRSocketApplicationTests.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-rsocket/src/test/java/smoketest/rsocket/SampleRSocketApplicationTests.java @@ -16,8 +16,6 @@ package smoketest.rsocket; -import java.time.Duration; - import io.rsocket.metadata.WellKnownMimeType; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; @@ -43,7 +41,7 @@ public class SampleRSocketApplicationTests { @Test void unauthenticatedAccessToRSocketEndpoint() { - RSocketRequester requester = this.builder.connectTcp("localhost", this.port).block(Duration.ofSeconds(5)); + RSocketRequester requester = this.builder.tcp("localhost", this.port); Mono result = requester.route("find.project.spring-boot").retrieveMono(Project.class); StepVerifier.create(result).expectErrorMessage("Access Denied").verify(); } @@ -54,7 +52,7 @@ public class SampleRSocketApplicationTests { .rsocketStrategies((builder) -> builder.encoder(new SimpleAuthenticationEncoder())) .setupMetadata(new UsernamePasswordMetadata("user", "password"), MimeTypeUtils.parseMimeType(WellKnownMimeType.MESSAGE_RSOCKET_AUTHENTICATION.getString())) - .connectTcp("localhost", this.port).block(Duration.ofSeconds(5)); + .tcp("localhost", this.port); Mono result = requester.route("find.project.spring-boot").retrieveMono(Project.class); StepVerifier.create(result) .assertNext((project) -> Assertions.assertThat(project.getName()).isEqualTo("spring-boot"))