Skip to content

Commit aa895e7

Browse files
committed
Upgrade dependencies; prepare for release
* Fix MongoDB tests for changed return type from Spring Data MongoDB
1 parent d5e3148 commit aa895e7

File tree

4 files changed

+77
-79
lines changed

4 files changed

+77
-79
lines changed

build.gradle

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlinVersion = '1.3.50'
2+
ext.kotlinVersion = '1.3.60'
33
repositories {
44
maven { url 'https://repo.spring.io/plugins-release' }
55
}
@@ -42,15 +42,15 @@ ext {
4242
modifiedFiles =
4343
files(grgit.status().unstaged.modified).filter{ f -> f.name.endsWith('.java') || f.name.endsWith('.kt') }
4444

45-
activeMqVersion = '5.15.10'
45+
activeMqVersion = '5.15.11'
4646
apacheSshdVersion = '2.3.0'
4747
avroVersion = '1.9.1'
48-
aspectjVersion = '1.9.4'
48+
aspectjVersion = '1.9.5'
4949
assertjVersion = '3.14.0'
5050
assertkVersion = '0.20'
5151
awaitilityVersion = '4.0.1'
5252
boonVersion = '0.34'
53-
commonsDbcp2Version = '2.6.0'
53+
commonsDbcp2Version = '2.7.0'
5454
commonsIoVersion = '2.6'
5555
commonsNetVersion = '3.6'
5656
curatorVersion = '4.2.0'
@@ -59,17 +59,17 @@ ext {
5959
googleJsr305Version = '3.0.2'
6060
groovyVersion = '2.5.8'
6161
hamcrestVersion = '2.2'
62-
hazelcastVersion = '3.12.3'
63-
hibernateVersion = '5.4.7.Final'
62+
hazelcastVersion = '3.12.4'
63+
hibernateVersion = '5.4.9.Final'
6464
hsqldbVersion = '2.5.0'
6565
h2Version = '1.4.200'
66-
jacksonVersion = '2.10.0'
66+
jacksonVersion = '2.10.1'
6767
javaxActivationVersion = '1.2.0'
6868
javaxMailVersion = '1.6.2'
6969
jmsApiVersion = '2.0.1'
7070
jpa21ApiVersion = '1.0.2.Final'
7171
jpaApiVersion = '2.2.1'
72-
jrubyVersion = '9.2.8.0'
72+
jrubyVersion = '9.2.9.0'
7373
jschVersion = '0.1.55'
7474
jsonpathVersion = '2.4.0'
7575
junit4Version = '4.12'
@@ -78,8 +78,8 @@ ext {
7878
kryoShadedVersion = '4.0.2'
7979
lettuceVersion = '5.2.1.RELEASE'
8080
log4jVersion = '2.12.1'
81-
micrometerVersion = '1.3.1'
82-
mockitoVersion = '3.1.0'
81+
micrometerVersion = '1.3.2'
82+
mockitoVersion = '3.2.0'
8383
mysqlVersion = '8.0.18'
8484
pahoMqttClientVersion = '1.2.0'
8585
postgresVersion = '42.2.8'
@@ -95,7 +95,7 @@ ext {
9595
springRetryVersion = '1.2.4.RELEASE'
9696
springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.2.2.RELEASE'
9797
springWsVersion = '3.0.8.RELEASE'
98-
tomcatVersion = "9.0.27"
98+
tomcatVersion = "9.0.29"
9999
xstreamVersion = '1.4.11.1'
100100
}
101101

@@ -330,7 +330,7 @@ subprojects { subproject ->
330330

331331
checkstyle {
332332
configFile = file("$rootDir/src/checkstyle/checkstyle.xml")
333-
toolVersion = '8.25'
333+
toolVersion = '8.26'
334334
}
335335

336336
artifacts {

spring-integration-core/src/main/java/org/springframework/integration/channel/FluxMessageChannel.java

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
import org.springframework.messaging.Message;
2323
import org.springframework.util.Assert;
2424

25+
import reactor.core.Disposable;
26+
import reactor.core.Disposables;
2527
import reactor.core.publisher.EmitterProcessor;
2628
import reactor.core.publisher.Flux;
2729
import reactor.core.publisher.FluxSink;
@@ -47,6 +49,8 @@ public class FluxMessageChannel extends AbstractMessageChannel
4749

4850
private final ReplayProcessor<Boolean> subscribedSignal = ReplayProcessor.create(1);
4951

52+
private final Disposable.Composite upstreamSubscriptions = Disposables.composite();
53+
5054
public FluxMessageChannel() {
5155
this.processor = EmitterProcessor.create(1, false);
5256
this.sink = this.processor.sink(FluxSink.OverflowStrategy.BUFFER);
@@ -70,23 +74,25 @@ public void subscribe(Subscriber<? super Message<?>> subscriber) {
7074

7175
@Override
7276
public void subscribeTo(Publisher<? extends Message<?>> publisher) {
73-
Flux.from(publisher)
74-
.delaySubscription(this.subscribedSignal.filter(Boolean::booleanValue).next())
75-
.publishOn(Schedulers.boundedElastic())
76-
.doOnNext((message) -> {
77-
try {
78-
send(message);
79-
}
80-
catch (Exception e) {
81-
logger.warn("Error during processing event: " + message, e);
82-
}
83-
})
84-
.subscribe();
77+
this.upstreamSubscriptions.add(
78+
Flux.from(publisher)
79+
.delaySubscription(this.subscribedSignal.filter(Boolean::booleanValue).next())
80+
.publishOn(Schedulers.boundedElastic())
81+
.doOnNext((message) -> {
82+
try {
83+
send(message);
84+
}
85+
catch (Exception e) {
86+
logger.warn("Error during processing event: " + message, e);
87+
}
88+
})
89+
.subscribe());
8590
}
8691

8792
@Override
8893
public void destroy() {
8994
this.subscribedSignal.onNext(false);
95+
this.upstreamSubscriptions.dispose();
9096
this.processor.onComplete();
9197
super.destroy();
9298
}

spring-integration-mongodb/src/test/java/org/springframework/integration/mongodb/config/MongoDbInboundChannelAdapterIntegrationTests.java

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
import java.util.List;
2222

23-
import org.bson.Document;
2423
import org.junit.Test;
2524
import org.junit.runner.RunWith;
2625

@@ -40,8 +39,9 @@
4039
import org.springframework.integration.mongodb.rules.MongoDbAvailableTests;
4140
import org.springframework.messaging.Message;
4241
import org.springframework.test.annotation.DirtiesContext;
43-
import org.springframework.test.context.ContextConfiguration;
44-
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
42+
import org.springframework.test.context.junit4.SpringRunner;
43+
44+
import com.mongodb.BasicDBObject;
4545

4646
/**
4747
* @author Oleg Zhurakousky
@@ -50,8 +50,7 @@
5050
*
5151
* @since 2.2
5252
*/
53-
@ContextConfiguration
54-
@RunWith(SpringJUnit4ClassRunner.class)
53+
@RunWith(SpringRunner.class)
5554
@DirtiesContext
5655
public class MongoDbInboundChannelAdapterIntegrationTests extends MongoDbAvailableTests {
5756

@@ -102,7 +101,7 @@ public class MongoDbInboundChannelAdapterIntegrationTests extends MongoDbAvailab
102101

103102
@Test
104103
@MongoDbAvailable
105-
public void testWithDefaultMongoFactory() throws Exception {
104+
public void testWithDefaultMongoFactory() {
106105
this.mongoTemplate.save(createPerson("Bob"), "data");
107106

108107
this.mongoInboundAdapter.start();
@@ -119,13 +118,13 @@ public void testWithDefaultMongoFactory() throws Exception {
119118

120119
@Test
121120
@MongoDbAvailable
122-
public void testWithNamedMongoFactory() throws Exception {
121+
public void testWithNamedMongoFactory() {
123122
this.mongoTemplate.save(this.createPerson("Bob"), "data");
124123

125124
this.mongoInboundAdapterNamedFactory.start();
126125

127126
@SuppressWarnings("unchecked")
128-
Message<List<Document>> message = (Message<List<Document>>) replyChannel.receive(10000);
127+
Message<List<BasicDBObject>> message = (Message<List<BasicDBObject>>) replyChannel.receive(10000);
129128
assertThat(message).isNotNull();
130129
assertThat(message.getPayload().get(0).get("name")).isEqualTo("Bob");
131130

@@ -135,7 +134,7 @@ public void testWithNamedMongoFactory() throws Exception {
135134

136135
@Test
137136
@MongoDbAvailable
138-
public void testWithMongoTemplate() throws Exception {
137+
public void testWithMongoTemplate() {
139138
this.mongoTemplate.save(this.createPerson("Bob"), "data");
140139

141140
this.mongoInboundAdapterWithTemplate.start();
@@ -151,7 +150,7 @@ public void testWithMongoTemplate() throws Exception {
151150

152151
@Test
153152
@MongoDbAvailable
154-
public void testWithNamedCollection() throws Exception {
153+
public void testWithNamedCollection() {
155154
this.mongoTemplate.save(this.createPerson("Bob"), "foo");
156155

157156
this.mongoInboundAdapterWithNamedCollection.start();
@@ -167,7 +166,7 @@ public void testWithNamedCollection() throws Exception {
167166

168167
@Test
169168
@MongoDbAvailable
170-
public void testWithQueryExpression() throws Exception {
169+
public void testWithQueryExpression() {
171170
this.mongoTemplate.save(this.createPerson("Bob"), "foo");
172171
this.mongoTemplate.save(this.createPerson("Bob"), "foo");
173172
this.mongoInboundAdapterWithQueryExpression.start();
@@ -181,7 +180,7 @@ public void testWithQueryExpression() throws Exception {
181180

182181
@Test
183182
@MongoDbAvailable
184-
public void testWithStringQueryExpression() throws Exception {
183+
public void testWithStringQueryExpression() {
185184
this.mongoTemplate.save(this.createPerson("Bob"), "foo");
186185
this.mongoInboundAdapterWithStringQueryExpression.start();
187186
@SuppressWarnings("unchecked")
@@ -193,7 +192,7 @@ public void testWithStringQueryExpression() throws Exception {
193192

194193
@Test
195194
@MongoDbAvailable
196-
public void testWithNamedCollectionExpression() throws Exception {
195+
public void testWithNamedCollectionExpression() {
197196
this.mongoTemplate.save(this.createPerson("Bob"), "foo");
198197

199198
this.mongoInboundAdapterWithNamedCollectionExpression.start();
@@ -209,7 +208,7 @@ public void testWithNamedCollectionExpression() throws Exception {
209208

210209
@Test
211210
@MongoDbAvailable
212-
public void testWithOnSuccessDisposition() throws Exception {
211+
public void testWithOnSuccessDisposition() {
213212
this.mongoTemplate.save(createPerson("Bob"), "data");
214213

215214
this.inboundAdapterWithOnSuccessDisposition.start();
@@ -227,7 +226,7 @@ public void testWithOnSuccessDisposition() throws Exception {
227226

228227
@Test
229228
@MongoDbAvailable
230-
public void testWithMongoConverter() throws Exception {
229+
public void testWithMongoConverter() {
231230
this.mongoTemplate.save(this.createPerson("Bob"), "data");
232231

233232
this.mongoInboundAdapterWithConverter.start();
@@ -244,25 +243,25 @@ public void testWithMongoConverter() throws Exception {
244243

245244
@Test(expected = BeanDefinitionParsingException.class)
246245
@MongoDbAvailable
247-
public void testFailureWithQueryAndQueryExpression() throws Exception {
246+
public void testFailureWithQueryAndQueryExpression() {
248247
new ClassPathXmlApplicationContext("inbound-fail-q-qex.xml", this.getClass()).close();
249248
}
250249

251250
@Test(expected = BeanDefinitionParsingException.class)
252251
@MongoDbAvailable
253-
public void testFailureWithFactoryAndTemplate() throws Exception {
252+
public void testFailureWithFactoryAndTemplate() {
254253
new ClassPathXmlApplicationContext("inbound-fail-factory-template.xml", this.getClass()).close();
255254
}
256255

257256
@Test(expected = BeanDefinitionParsingException.class)
258257
@MongoDbAvailable
259-
public void testFailureWithCollectionAndCollectionExpression() throws Exception {
258+
public void testFailureWithCollectionAndCollectionExpression() {
260259
new ClassPathXmlApplicationContext("inbound-fail-c-cex.xml", this.getClass()).close();
261260
}
262261

263262
@Test(expected = BeanDefinitionParsingException.class)
264263
@MongoDbAvailable
265-
public void testFailureWithTemplateAndConverter() throws Exception {
264+
public void testFailureWithTemplateAndConverter() {
266265
new ClassPathXmlApplicationContext("inbound-fail-converter-template.xml", this.getClass()).close();
267266
}
268267

0 commit comments

Comments
 (0)