Skip to content

Commit 8f92bb2

Browse files
committed
Start version 5.4
* Fix compatibility after upgrading to some latest dependencies
1 parent 42845f0 commit 8f92bb2

File tree

4 files changed

+39
-48
lines changed

4 files changed

+39
-48
lines changed

build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ ext {
5959
derbyVersion = '10.14.2.0'
6060
ftpServerVersion = '1.1.1'
6161
googleJsr305Version = '3.0.2'
62-
groovyVersion = '2.5.11'
62+
groovyVersion = '3.0.3'
6363
hamcrestVersion = '2.2'
64-
hazelcastVersion = '3.12.6'
64+
hazelcastVersion = '4.0.1'
6565
hibernateVersion = '5.4.14.Final'
6666
hsqldbVersion = '2.5.0'
6767
h2Version = '1.4.200'
@@ -92,11 +92,11 @@ ext {
9292
rsocketVersion = '1.0.0'
9393
servletApiVersion = '4.0.1'
9494
smackVersion = '4.3.4'
95-
springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '2.2.6.RELEASE'
96-
springDataVersion = project.hasProperty('springDataVersion') ? project.springDataVersion : 'Neumann-RELEASE'
97-
springSecurityVersion = project.hasProperty('springSecurityVersion') ? project.springSecurityVersion : '5.3.2.RELEASE'
95+
springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '2.3.0.BUILD-SNAPSHOT'
96+
springDataVersion = project.hasProperty('springDataVersion') ? project.springDataVersion : 'Neumann-BUILD-SNAPSHOT'
97+
springSecurityVersion = project.hasProperty('springSecurityVersion') ? project.springSecurityVersion : '5.4.0.BUILD-SNAPSHOT'
9898
springRetryVersion = '1.2.5.RELEASE'
99-
springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.2.6.RELEASE'
99+
springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.3.0-SNAPSHOT'
100100
springWsVersion = '3.0.9.RELEASE'
101101
tomcatVersion = "9.0.35"
102102
xstreamVersion = '1.4.12'
@@ -112,7 +112,7 @@ allprojects {
112112
if (project.hasProperty('mavenLocal')) {
113113
mavenLocal()
114114
}
115-
if (version.endsWith('BUILD-SNAPSHOT')) {
115+
if (version.endsWith('SNAPSHOT')) {
116116
maven { url 'https://repo.spring.io/libs-snapshot' }
117117
}
118118
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version=5.3.1.BUILD-SNAPSHOT
1+
version=5.4.0-SNAPSHOT
22
org.gradle.jvmargs=-Xmx1536m -Dfile.encoding=UTF-8
33
org.gradle.caching=true
44
org.gradle.parallel=true

spring-integration-groovy/src/test/java/org/springframework/integration/groovy/config/GroovyServiceActivatorTests.java

Lines changed: 26 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
1717
package org.springframework.integration.groovy.config;
1818

1919
import static org.assertj.core.api.Assertions.assertThat;
20-
import static org.assertj.core.api.Assertions.fail;
20+
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
2121

2222
import java.text.DateFormat;
2323
import java.text.SimpleDateFormat;
@@ -26,8 +26,7 @@
2626
import java.util.Map;
2727
import java.util.concurrent.atomic.AtomicBoolean;
2828

29-
import org.junit.Test;
30-
import org.junit.runner.RunWith;
29+
import org.junit.jupiter.api.Test;
3130

3231
import org.springframework.beans.factory.annotation.Autowired;
3332
import org.springframework.beans.factory.parsing.BeanDefinitionParsingException;
@@ -43,8 +42,7 @@
4342
import org.springframework.messaging.support.ErrorMessage;
4443
import org.springframework.messaging.support.GenericMessage;
4544
import org.springframework.scripting.groovy.GroovyObjectCustomizer;
46-
import org.springframework.test.context.ContextConfiguration;
47-
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
45+
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
4846

4947
import groovy.lang.GroovyObject;
5048
import groovy.lang.MissingPropertyException;
@@ -54,10 +52,10 @@
5452
* @author Oleg Zhurakousky
5553
* @author Artem Bilan
5654
* @author Gunnar Hillert
55+
*
5756
* @since 2.0
5857
*/
59-
@ContextConfiguration
60-
@RunWith(SpringJUnit4ClassRunner.class)
58+
@SpringJUnitConfig
6159
public class GroovyServiceActivatorTests {
6260

6361
@Autowired
@@ -86,7 +84,7 @@ public class GroovyServiceActivatorTests {
8684

8785

8886
@Test
89-
public void referencedScriptAndCustomiser() throws Exception {
87+
public void referencedScriptAndCustomizer() throws Exception {
9088
groovyCustomizer.executed = false;
9189
QueueChannel replyChannel = new QueueChannel();
9290
replyChannel.setBeanName("returnAddress");
@@ -134,7 +132,7 @@ public void withScriptVariableGenerator() throws Exception {
134132
}
135133

136134
@Test
137-
public void inlineScript() throws Exception {
135+
public void inlineScript() {
138136
groovyCustomizer.executed = false;
139137
QueueChannel replyChannel = new QueueChannel();
140138
replyChannel.setBeanName("returnAddress");
@@ -156,7 +154,7 @@ public void inlineScript() throws Exception {
156154
}
157155

158156
@Test
159-
public void testScriptWithoutVariables() throws Exception {
157+
public void testScriptWithoutVariables() {
160158
PollableChannel replyChannel = new QueueChannel();
161159
for (int i = 1; i <= 3; i++) {
162160
Message<?> message = MessageBuilder.withPayload("test-" + i).setReplyChannel(replyChannel).build();
@@ -174,41 +172,36 @@ public void testScriptWithoutVariables() throws Exception {
174172
assertThat(replyChannel.receive(0)).isNull();
175173
}
176174

177-
//INT-2399
178-
@Test(expected = MessageHandlingException.class)
179-
public void invalidInlineScript() throws Exception {
180-
Message<?> message =
181-
new ErrorMessage(new ReplyRequiredException(new GenericMessage<String>("test"), "reply required!"));
182-
try {
183-
this.invalidInlineScript.send(message);
184-
fail("MessageHandlingException expected!");
185-
}
186-
catch (Exception e) {
187-
Throwable cause = e.getCause();
188-
assertThat(cause.getClass()).isEqualTo(MissingPropertyException.class);
189-
assertThat(cause.getMessage()).contains("No such property: ReplyRequiredException for class: script");
190-
throw e;
191-
}
192-
175+
@Test
176+
public void invalidInlineScript() {
177+
assertThatExceptionOfType(MessageHandlingException.class)
178+
.isThrownBy(() ->
179+
this.invalidInlineScript.send(
180+
new ErrorMessage(
181+
new ReplyRequiredException(new GenericMessage<>("test"), "reply required!"))))
182+
.withStackTraceContaining("No such property: ReplyRequiredException for class: Script_")
183+
.withCauseInstanceOf(MissingPropertyException.class);
193184
}
194185

195-
@Test(expected = BeanDefinitionParsingException.class)
196-
public void variablesAndScriptVariableGenerator() throws Exception {
197-
new ClassPathXmlApplicationContext("GroovyServiceActivatorTests-fail-withgenerator-context.xml",
198-
this.getClass()).close();
186+
@Test
187+
public void variablesAndScriptVariableGenerator() {
188+
assertThatExceptionOfType(BeanDefinitionParsingException.class)
189+
.isThrownBy(() ->
190+
new ClassPathXmlApplicationContext("GroovyServiceActivatorTests-fail-withgenerator-context.xml",
191+
this.getClass()));
199192
}
200193

201194
@Test
202195
public void testGroovyScriptForOutboundChannelAdapter() {
203-
this.outboundChannelAdapterWithGroovy.send(new GenericMessage<String>("foo"));
196+
this.outboundChannelAdapterWithGroovy.send(new GenericMessage<>("foo"));
204197
assertThat(this.invoked.get()).isTrue();
205198
}
206199

207200

208201
public static class SampleScriptVariSource implements ScriptVariableGenerator {
209202

210203
public Map<String, Object> generateScriptVariables(Message<?> message) {
211-
Map<String, Object> variables = new HashMap<String, Object>();
204+
Map<String, Object> variables = new HashMap<>();
212205
variables.put("foo", "foo");
213206
variables.put("bar", "bar");
214207
variables.put("date", new Date());

spring-integration-websocket/src/test/java/org/springframework/integration/websocket/client/StompIntegrationTests.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2019 the original author or authors.
2+
* Copyright 2014-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,8 +27,7 @@
2727
import java.util.concurrent.CountDownLatch;
2828
import java.util.concurrent.TimeUnit;
2929

30-
import org.junit.Test;
31-
import org.junit.runner.RunWith;
30+
import org.junit.jupiter.api.Test;
3231

3332
import org.springframework.beans.factory.annotation.Autowired;
3433
import org.springframework.beans.factory.annotation.Qualifier;
@@ -80,7 +79,7 @@
8079
import org.springframework.stereotype.Controller;
8180
import org.springframework.test.annotation.DirtiesContext;
8281
import org.springframework.test.context.ContextConfiguration;
83-
import org.springframework.test.context.junit4.SpringRunner;
82+
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
8483
import org.springframework.util.MultiValueMap;
8584
import org.springframework.web.socket.client.WebSocketClient;
8685
import org.springframework.web.socket.client.standard.StandardWebSocketClient;
@@ -104,7 +103,7 @@
104103
* @since 4.1
105104
*/
106105
@ContextConfiguration(classes = StompIntegrationTests.ClientConfig.class)
107-
@RunWith(SpringRunner.class)
106+
@SpringJUnitConfig
108107
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
109108
public class StompIntegrationTests {
110109

@@ -382,7 +381,6 @@ public PollableChannel webSocketEvents() {
382381
}
383382

384383
@Bean
385-
@SuppressWarnings("unchecked")
386384
public ApplicationListener<ApplicationEvent> webSocketEventListener() {
387385
ApplicationEventListeningMessageProducer producer = new ApplicationEventListeningMessageProducer();
388386
producer.setEventTypes(AbstractSubProtocolEvent.class);
@@ -446,7 +444,7 @@ public int number() {
446444

447445
@MessagingGateway
448446
@Controller
449-
interface WebSocketGateway {
447+
public interface WebSocketGateway {
450448

451449
@MessageMapping("/greeting")
452450
@SendToUser("/queue/answer")

0 commit comments

Comments
 (0)