Upgrade dependencies; prepare for release

* Add `spring-web` test dep for `spring-integration-graphql` module
* Fix `MultipartAsRawByteArrayTests` according to the changes in the
`ByteArrayHttpMessageConverter` where it uses `ReadNBytes()` even for
`0` in `Content-Length` header
* Fix Kafka tests to use `RetryListener` interface with `default`
methods instead of already deprecated `RetryListenerSupport`
This commit is contained in:
abilan
2023-03-22 16:41:03 -04:00
parent 1bec420fd1
commit 79870dc78c
4 changed files with 31 additions and 26 deletions

View File

@@ -19,7 +19,7 @@ plugins {
id 'io.spring.nohttp' version '0.0.11' apply false
id 'org.ajoberstar.grgit' version '4.1.1'
id 'io.spring.dependency-management' version '1.1.0'
id 'com.jfrog.artifactory' version '4.31.4' apply false
id 'com.jfrog.artifactory' version '4.31.7' apply false
id 'org.jetbrains.dokka' version "$kotlinVersion"
id 'org.asciidoctor.jvm.pdf' version '3.3.2'
id 'org.asciidoctor.jvm.gems' version '3.3.2'
@@ -64,8 +64,8 @@ ext {
findbugsVersion = '3.0.1'
ftpServerVersion = '1.2.0'
graalvmVersion = '22.3.1'
greenmailVersion = '2.0.0-alpha-3'
groovyVersion = '4.0.9'
greenmailVersion = '2.0.0'
groovyVersion = '4.0.10'
hamcrestVersion = '2.2'
hazelcastVersion = '5.2.2'
hibernateVersion = '6.1.7.Final'
@@ -87,31 +87,31 @@ ext {
lettuceVersion = '6.2.3.RELEASE'
log4jVersion = '2.19.0'
mailVersion = '1.0.0'
micrometerTracingVersion = '1.1.0-M1'
micrometerVersion = '1.11.0-M1'
mockitoVersion = '5.1.1'
micrometerTracingVersion = '1.1.0-M2'
micrometerVersion = '1.11.0-M2'
mockitoVersion = '5.2.0'
mongoDriverVersion = '4.9.0'
mysqlVersion = '8.0.32'
pahoMqttClientVersion = '1.2.5'
postgresVersion = '42.5.4'
protobufVersion = '3.21.12'
r2dbch2Version = '1.0.0.RELEASE'
reactorVersion = '2022.0.3'
reactorVersion = '2022.0.5'
resilience4jVersion = '2.0.2'
romeToolsVersion = '2.0.0'
romeToolsVersion = '2.1.0'
rsocketVersion = '1.1.3'
servletApiVersion = '6.0.0'
smackVersion = '4.4.6'
springAmqpVersion = '3.0.2'
springDataVersion = '2023.0.0-M2'
springGraphqlVersion = '1.1.2'
springKafkaVersion = '3.0.3'
springRetryVersion = '2.0.0'
springSecurityVersion = '6.1.0-M1'
springVersion = '6.0.5'
springAmqpVersion = '3.0.3'
springDataVersion = '2023.0.0-M3'
springGraphqlVersion = '1.2.0-M1'
springKafkaVersion = '3.0.5'
springRetryVersion = '2.0.1'
springSecurityVersion = '6.1.0-M2'
springVersion = '6.0.7'
springWsVersion = '4.0.1'
testcontainersVersion = '1.17.6'
tomcatVersion = '11.0.0-M1'
tomcatVersion = '11.0.0-M4'
xmlUnitVersion = '2.9.1'
xstreamVersion = '1.4.20'
ztZipVersion = '1.15'
@@ -364,7 +364,7 @@ configure(javaProjects) { subproject ->
checkstyle {
configDirectory.set(rootProject.file('src/checkstyle'))
toolVersion = project.hasProperty('checkstyleVersion') ? project.checkstyleVersion : '10.8.0'
toolVersion = project.hasProperty('checkstyleVersion') ? project.checkstyleVersion : '10.9.2'
}
jar {
@@ -624,6 +624,8 @@ project('spring-integration-graphql') {
dependencies {
api project(':spring-integration-core')
api "org.springframework.graphql:spring-graphql:$springGraphqlVersion"
testImplementation 'org.springframework:spring-web'
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2022 the original author or authors.
* Copyright 2015-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,6 +32,7 @@ import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -57,9 +58,11 @@ public class MultipartAsRawByteArrayTests {
gw.afterPropertiesSet();
gw.start();
String testData = "test data";
HttpServletRequest request = mock(HttpServletRequest.class);
ServletInputStream sis = mock(ServletInputStream.class);
doReturn("test data".getBytes()).when(sis).readAllBytes();
doReturn(testData.getBytes()).when(sis).readNBytes(anyInt());
when(request.getInputStream()).thenReturn(sis);
when(request.getMethod()).thenReturn("POST");
when(request.getHeaderNames()).thenReturn(mock(Enumeration.class));
@@ -70,7 +73,7 @@ public class MultipartAsRawByteArrayTests {
Message<?> received = requestChannel.receive(10000);
assertThat(received).isNotNull();
assertThat(received.getPayload()).isInstanceOf(byte[].class);
assertThat(new String((byte[]) received.getPayload())).isEqualTo("test data");
assertThat(new String((byte[]) received.getPayload())).isEqualTo(testData);
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2018-2022 the original author or authors.
* Copyright 2018-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -56,8 +56,8 @@ import org.springframework.messaging.MessagingException;
import org.springframework.messaging.support.ErrorMessage;
import org.springframework.retry.RetryCallback;
import org.springframework.retry.RetryContext;
import org.springframework.retry.RetryListener;
import org.springframework.retry.backoff.NoBackOffPolicy;
import org.springframework.retry.listener.RetryListenerSupport;
import org.springframework.retry.policy.SimpleRetryPolicy;
import org.springframework.retry.support.RetryTemplate;
@@ -392,7 +392,7 @@ class InboundGatewayTests {
retryTemplate.setRetryPolicy(retryPolicy);
retryTemplate.setBackOffPolicy(new NoBackOffPolicy());
final CountDownLatch retryCountLatch = new CountDownLatch(retryPolicy.getMaxAttempts());
retryTemplate.registerListener(new RetryListenerSupport() {
retryTemplate.registerListener(new RetryListener() {
@Override
public <T, E extends Throwable> void onError(RetryContext context, RetryCallback<T, E> callback,

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2022 the original author or authors.
* Copyright 2016-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -83,7 +83,7 @@ import org.springframework.messaging.PollableChannel;
import org.springframework.messaging.support.ErrorMessage;
import org.springframework.retry.RetryCallback;
import org.springframework.retry.RetryContext;
import org.springframework.retry.listener.RetryListenerSupport;
import org.springframework.retry.RetryListener;
import org.springframework.retry.policy.SimpleRetryPolicy;
import org.springframework.retry.support.RetryTemplate;
@@ -310,7 +310,7 @@ class MessageDrivenAdapterTests {
retryPolicy.setMaxAttempts(2);
retryTemplate.setRetryPolicy(retryPolicy);
final CountDownLatch retryCountLatch = new CountDownLatch(retryPolicy.getMaxAttempts());
retryTemplate.registerListener(new RetryListenerSupport() {
retryTemplate.registerListener(new RetryListener() {
@Override
public <T, E extends Throwable> void onError(RetryContext context, RetryCallback<T, E> callback,