From cf1e3ce0daadbdf874b5e27151a3bc620da64cec Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Wed, 7 Oct 2020 20:13:34 +0100 Subject: [PATCH] Upgrade to Spring Boot 2.4 snapshots in order to make use of a recent change for WebMvc.fn in Spring Framework 5.3. See gh-6 --- build.gradle | 8 ++++++-- settings.gradle | 7 +++++++ .../graphql/WebInterceptorExecutionChainTests.java | 7 +++---- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index c5352400..3d113a52 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,7 @@ +import org.springframework.boot.gradle.plugin.SpringBootPlugin + plugins { - id 'org.springframework.boot' version '2.3.3.RELEASE' apply false + id 'org.springframework.boot' version '2.4.0-SNAPSHOT' apply false } subprojects { @@ -14,11 +16,13 @@ subprojects { repositories { mavenCentral() + maven { url 'https://repo.spring.io/milestone' } + maven { url "https://repo.spring.io/snapshot" } } dependencyManagement { imports { - mavenBom org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES + mavenBom SpringBootPlugin.BOM_COORDINATES } dependencies { dependency 'com.graphql-java:graphql-java:15.0' diff --git a/settings.gradle b/settings.gradle index afac47e7..b48142ac 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1,10 @@ +pluginManagement { + repositories { + mavenCentral() + maven { url 'https://repo.spring.io/snapshot' } + } +} + rootProject.name = 'spring-graphql' include 'spring-boot-starter-graphql-web' include 'spring-boot-starter-graphql-webflux' diff --git a/spring-graphql-web/src/test/java/org/springframework/graphql/WebInterceptorExecutionChainTests.java b/spring-graphql-web/src/test/java/org/springframework/graphql/WebInterceptorExecutionChainTests.java index e43503b5..b1e1ddef 100644 --- a/spring-graphql-web/src/test/java/org/springframework/graphql/WebInterceptorExecutionChainTests.java +++ b/spring-graphql-web/src/test/java/org/springframework/graphql/WebInterceptorExecutionChainTests.java @@ -37,8 +37,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.util.ResourceUtils; import static graphql.schema.idl.TypeRuntimeWiring.newTypeWiring; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.assertj.core.api.Assertions.assertThat; /** * Unit tests for {@link WebInterceptorExecutionChain}. @@ -68,8 +67,8 @@ public class WebInterceptorExecutionChainTests { WebOutput webOutput = new WebInterceptorExecutionChain(createGraphQL(), interceptors) .execute(webInput).block(); - assertEquals(":pre1:pre2:pre3:post3:post2:post1", sb.toString()); - assertTrue(webOutput.isDataPresent()); + assertThat(sb.toString()).isEqualTo(":pre1:pre2:pre3:post3:post2:post1"); + assertThat(webOutput.isDataPresent()).isTrue(); } private static GraphQL createGraphQL() throws Exception {