Upgrade dependencies, including Gradle
* Alongside with existing `springAmqpVersion` & `springVersion` also expose `springDataVersion` & `springSecurityVersion` project properties. These can be used in external CI plans for compatibility builds * Fix `IntegrationGraphServerTests` for the current state of graph - The node name is now based on the endpoint id, not a `MH` bean name * Fix MongoDB tests for compatibility with the latest driver
This commit is contained in:
26
build.gradle
26
build.gradle
@@ -1,5 +1,5 @@
|
||||
buildscript {
|
||||
ext.kotlinVersion = '1.3.60'
|
||||
ext.kotlinVersion = '1.3.61'
|
||||
repositories {
|
||||
maven { url 'https://repo.spring.io/plugins-release' }
|
||||
}
|
||||
@@ -59,8 +59,8 @@ ext {
|
||||
googleJsr305Version = '3.0.2'
|
||||
groovyVersion = '2.5.8'
|
||||
hamcrestVersion = '2.2'
|
||||
hazelcastVersion = '3.12.4'
|
||||
hibernateVersion = '5.4.9.Final'
|
||||
hazelcastVersion = '3.12.5'
|
||||
hibernateVersion = '5.4.10.Final'
|
||||
hsqldbVersion = '2.5.0'
|
||||
h2Version = '1.4.200'
|
||||
jacksonVersion = '2.10.1'
|
||||
@@ -77,26 +77,26 @@ ext {
|
||||
jythonVersion = '2.7.0'
|
||||
kryoShadedVersion = '4.0.2'
|
||||
lettuceVersion = '5.2.1.RELEASE'
|
||||
log4jVersion = '2.12.1'
|
||||
log4jVersion = '2.13.0'
|
||||
micrometerVersion = '1.3.2'
|
||||
mockitoVersion = '3.2.0'
|
||||
mockitoVersion = '3.2.4'
|
||||
mongoDriverVersion = '4.0.0-SNAPSHOT'
|
||||
mysqlVersion = '8.0.18'
|
||||
pahoMqttClientVersion = '1.2.0'
|
||||
postgresVersion = '42.2.8'
|
||||
postgresVersion = '42.2.9'
|
||||
reactorVersion = 'Dysprosium-SR1'
|
||||
resilience4jVersion = '1.1.0'
|
||||
resilience4jVersion = '1.2.0'
|
||||
romeToolsVersion = '1.12.2'
|
||||
rsocketVersion = '1.0.0-RC5'
|
||||
servletApiVersion = '4.0.1'
|
||||
smackVersion = '4.3.4'
|
||||
springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '2.2.2.RELEASE'
|
||||
springDataVersion = 'Neumann-BUILD-SNAPSHOT'
|
||||
springSecurityVersion = '5.2.1.RELEASE'
|
||||
springRetryVersion = '1.2.4.RELEASE'
|
||||
springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '2.2.3.BUILD-SNAPSHOT'
|
||||
springDataVersion = project.hasProperty('springDataVersion') ? project.springDataVersion : 'Neumann-BUILD-SNAPSHOT'
|
||||
springSecurityVersion = project.hasProperty('springSecurityVersion') ? project.springSecurityVersion : '5.3.0.BUILD-SNAPSHOT'
|
||||
springRetryVersion = '1.2.5.RELEASE'
|
||||
springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.2.2.RELEASE'
|
||||
springWsVersion = '3.0.8.RELEASE'
|
||||
tomcatVersion = "9.0.29"
|
||||
tomcatVersion = "9.0.30"
|
||||
xstreamVersion = '1.4.11.1'
|
||||
}
|
||||
|
||||
@@ -305,7 +305,7 @@ subprojects { subproject ->
|
||||
}
|
||||
|
||||
task javadocJar(type: Jar) {
|
||||
classifier = 'javadoc'
|
||||
archiveClassifier = 'javadoc'
|
||||
from javadoc
|
||||
}
|
||||
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -217,7 +217,7 @@ public class IntegrationGraphServerTests {
|
||||
assertThat(jsonArray).hasSize(1);
|
||||
|
||||
jsonArray = JsonPathUtils.evaluate(baos.toByteArray(),
|
||||
"$..nodes[?(@.name == 'services.foo.serviceActivator.handler')]");
|
||||
"$..nodes[?(@.name == 'services.foo.serviceActivator')]");
|
||||
|
||||
assertThat(jsonArray).hasSize(1);
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ package org.springframework.integration.mongodb.rules;
|
||||
import java.time.Duration;
|
||||
|
||||
import org.bson.Document;
|
||||
import org.bson.UuidRepresentation;
|
||||
import org.bson.conversions.Bson;
|
||||
import org.junit.Rule;
|
||||
|
||||
@@ -38,6 +39,7 @@ import org.springframework.data.mongodb.core.mapping.MongoPersistentProperty;
|
||||
import org.springframework.integration.mongodb.outbound.MessageCollectionCallback;
|
||||
import org.springframework.messaging.Message;
|
||||
|
||||
import com.mongodb.MongoClientSettings;
|
||||
import com.mongodb.MongoException;
|
||||
import com.mongodb.client.MongoClients;
|
||||
import com.mongodb.client.MongoCollection;
|
||||
@@ -58,11 +60,15 @@ public abstract class MongoDbAvailableTests {
|
||||
@Rule
|
||||
public MongoDbAvailableRule mongoDbAvailableRule = new MongoDbAvailableRule();
|
||||
|
||||
public static final MongoDatabaseFactory MONGO_DATABASE_FACTORY =
|
||||
new SimpleMongoClientDatabaseFactory(
|
||||
MongoClients.create(
|
||||
MongoClientSettings.builder().uuidRepresentation(UuidRepresentation.STANDARD).build()),
|
||||
"test");
|
||||
|
||||
protected MongoDatabaseFactory prepareMongoFactory(String... additionalCollectionsToDrop) {
|
||||
MongoDatabaseFactory mongoDbFactory = new SimpleMongoClientDatabaseFactory(MongoClients.create(), "test");
|
||||
cleanupCollections(mongoDbFactory, additionalCollectionsToDrop);
|
||||
return mongoDbFactory;
|
||||
cleanupCollections(MONGO_DATABASE_FACTORY, additionalCollectionsToDrop);
|
||||
return MONGO_DATABASE_FACTORY;
|
||||
}
|
||||
|
||||
protected ReactiveMongoDatabaseFactory prepareReactiveMongoFactory(String... additionalCollectionsToDrop) {
|
||||
|
||||
@@ -31,7 +31,6 @@ import org.junit.Test;
|
||||
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.context.support.GenericApplicationContext;
|
||||
import org.springframework.data.mongodb.core.SimpleMongoClientDatabaseFactory;
|
||||
import org.springframework.integration.channel.DirectChannel;
|
||||
import org.springframework.integration.channel.QueueChannel;
|
||||
import org.springframework.integration.history.MessageHistory;
|
||||
@@ -47,8 +46,6 @@ import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.messaging.support.GenericMessage;
|
||||
|
||||
import com.mongodb.client.MongoClients;
|
||||
|
||||
/**
|
||||
* @author Oleg Zhurakousky
|
||||
* @author Gary Russell
|
||||
@@ -59,9 +56,6 @@ public abstract class AbstractMongoDbMessageGroupStoreTests extends MongoDbAvail
|
||||
|
||||
protected final GenericApplicationContext testApplicationContext = TestUtils.createTestApplicationContext();
|
||||
|
||||
protected final SimpleMongoClientDatabaseFactory clientDbFactory =
|
||||
new SimpleMongoClientDatabaseFactory(MongoClients.create(), "test");
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
this.testApplicationContext.refresh();
|
||||
@@ -70,7 +64,7 @@ public abstract class AbstractMongoDbMessageGroupStoreTests extends MongoDbAvail
|
||||
@After
|
||||
public void tearDown() {
|
||||
this.testApplicationContext.close();
|
||||
cleanupCollections(this.clientDbFactory);
|
||||
cleanupCollections(MONGO_DATABASE_FACTORY);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -28,7 +28,6 @@ import org.junit.Test;
|
||||
|
||||
import org.springframework.context.support.GenericApplicationContext;
|
||||
import org.springframework.data.annotation.PersistenceConstructor;
|
||||
import org.springframework.data.mongodb.core.SimpleMongoClientDatabaseFactory;
|
||||
import org.springframework.integration.channel.DirectChannel;
|
||||
import org.springframework.integration.history.MessageHistory;
|
||||
import org.springframework.integration.message.AdviceMessage;
|
||||
@@ -44,8 +43,6 @@ import org.springframework.messaging.MessagingException;
|
||||
import org.springframework.messaging.support.ErrorMessage;
|
||||
import org.springframework.messaging.support.GenericMessage;
|
||||
|
||||
import com.mongodb.client.MongoClients;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Mark Fisher
|
||||
@@ -58,9 +55,6 @@ public abstract class AbstractMongoDbMessageStoreTests extends MongoDbAvailableT
|
||||
|
||||
protected final GenericApplicationContext testApplicationContext = TestUtils.createTestApplicationContext();
|
||||
|
||||
protected final SimpleMongoClientDatabaseFactory clientDbFactory =
|
||||
new SimpleMongoClientDatabaseFactory(MongoClients.create(), "test");
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
this.testApplicationContext.refresh();
|
||||
@@ -69,7 +63,7 @@ public abstract class AbstractMongoDbMessageStoreTests extends MongoDbAvailableT
|
||||
@After
|
||||
public void tearDown() {
|
||||
this.testApplicationContext.close();
|
||||
cleanupCollections(this.clientDbFactory);
|
||||
cleanupCollections(MONGO_DATABASE_FACTORY);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -47,7 +47,8 @@ public class ConfigurableMongoDbMessageGroupStoreTests extends AbstractMongoDbMe
|
||||
|
||||
@Override
|
||||
protected ConfigurableMongoDbMessageStore getMessageGroupStore() {
|
||||
ConfigurableMongoDbMessageStore mongoDbMessageStore = new ConfigurableMongoDbMessageStore(this.clientDbFactory);
|
||||
ConfigurableMongoDbMessageStore mongoDbMessageStore =
|
||||
new ConfigurableMongoDbMessageStore(MONGO_DATABASE_FACTORY);
|
||||
mongoDbMessageStore.setApplicationContext(this.testApplicationContext);
|
||||
mongoDbMessageStore.afterPropertiesSet();
|
||||
return mongoDbMessageStore;
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xmlns:mongo="http://www.springframework.org/schema/data/mongo"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/integration
|
||||
https://www.springframework.org/schema/integration/spring-integration.xsd
|
||||
http://www.springframework.org/schema/data/mongo
|
||||
https://www.springframework.org/schema/data/mongo/spring-mongo.xsd">
|
||||
xmlns:util="http://www.springframework.org/schema/util"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd
|
||||
http://www.springframework.org/schema/data/mongo https://www.springframework.org/schema/data/mongo/spring-mongo.xsd
|
||||
http://www.springframework.org/schema/util https://www.springframework.org/schema/util/spring-util.xsd">
|
||||
|
||||
<mongo:db-factory dbname="test"/>
|
||||
<util:constant id="mongoDbFactory"
|
||||
static-field="org.springframework.integration.mongodb.store.ConfigurableMongoDbMessageGroupStoreTests.MONGO_DATABASE_FACTORY"/>
|
||||
|
||||
<mongo:auditing/>
|
||||
|
||||
|
||||
@@ -27,7 +27,8 @@ public class ConfigurableMongoDbMessageStoreTests extends AbstractMongoDbMessage
|
||||
|
||||
@Override
|
||||
protected MessageStore getMessageStore() {
|
||||
ConfigurableMongoDbMessageStore mongoDbMessageStore = new ConfigurableMongoDbMessageStore(this.clientDbFactory);
|
||||
ConfigurableMongoDbMessageStore mongoDbMessageStore =
|
||||
new ConfigurableMongoDbMessageStore(MONGO_DATABASE_FACTORY);
|
||||
mongoDbMessageStore.setApplicationContext(this.testApplicationContext);
|
||||
mongoDbMessageStore.afterPropertiesSet();
|
||||
return mongoDbMessageStore;
|
||||
|
||||
@@ -32,7 +32,7 @@ public class MongoDbMessageGroupStoreTests extends AbstractMongoDbMessageGroupSt
|
||||
@Override
|
||||
protected MongoDbMessageStore getMessageGroupStore() {
|
||||
MongoDbMessageStore mongoDbMessageStore =
|
||||
new MongoDbMessageStore(this.clientDbFactory);
|
||||
new MongoDbMessageStore(MONGO_DATABASE_FACTORY);
|
||||
mongoDbMessageStore.afterPropertiesSet();
|
||||
return mongoDbMessageStore;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.context.support.GenericApplicationContext;
|
||||
import org.springframework.data.mongodb.core.SimpleMongoClientDatabaseFactory;
|
||||
import org.springframework.integration.mongodb.rules.MongoDbAvailable;
|
||||
import org.springframework.integration.mongodb.rules.MongoDbAvailableTests;
|
||||
import org.springframework.integration.support.MessageBuilder;
|
||||
@@ -34,8 +33,6 @@ import org.springframework.integration.transformer.ClaimCheckInTransformer;
|
||||
import org.springframework.integration.transformer.ClaimCheckOutTransformer;
|
||||
import org.springframework.messaging.Message;
|
||||
|
||||
import com.mongodb.client.MongoClients;
|
||||
|
||||
/**
|
||||
* @author Mark Fisher
|
||||
* @author Artem Bilan
|
||||
@@ -44,9 +41,6 @@ public class MongoDbMessageStoreClaimCheckIntegrationTests extends MongoDbAvaila
|
||||
|
||||
private final GenericApplicationContext testApplicationContext = TestUtils.createTestApplicationContext();
|
||||
|
||||
private final SimpleMongoClientDatabaseFactory clientDbFactory =
|
||||
new SimpleMongoClientDatabaseFactory(MongoClients.create(), "test");
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
this.testApplicationContext.refresh();
|
||||
@@ -60,7 +54,7 @@ public class MongoDbMessageStoreClaimCheckIntegrationTests extends MongoDbAvaila
|
||||
@Test
|
||||
@MongoDbAvailable
|
||||
public void stringPayload() {
|
||||
MongoDbMessageStore messageStore = new MongoDbMessageStore(this.clientDbFactory);
|
||||
MongoDbMessageStore messageStore = new MongoDbMessageStore(MONGO_DATABASE_FACTORY);
|
||||
messageStore.afterPropertiesSet();
|
||||
ClaimCheckInTransformer checkin = new ClaimCheckInTransformer(messageStore);
|
||||
ClaimCheckOutTransformer checkout = new ClaimCheckOutTransformer(messageStore);
|
||||
@@ -76,7 +70,7 @@ public class MongoDbMessageStoreClaimCheckIntegrationTests extends MongoDbAvaila
|
||||
@Test
|
||||
@MongoDbAvailable
|
||||
public void objectPayload() {
|
||||
MongoDbMessageStore messageStore = new MongoDbMessageStore(this.clientDbFactory);
|
||||
MongoDbMessageStore messageStore = new MongoDbMessageStore(MONGO_DATABASE_FACTORY);
|
||||
messageStore.afterPropertiesSet();
|
||||
ClaimCheckInTransformer checkin = new ClaimCheckInTransformer(messageStore);
|
||||
ClaimCheckOutTransformer checkout = new ClaimCheckOutTransformer(messageStore);
|
||||
@@ -96,7 +90,7 @@ public class MongoDbMessageStoreClaimCheckIntegrationTests extends MongoDbAvaila
|
||||
@Test
|
||||
@MongoDbAvailable
|
||||
public void stringPayloadConfigurable() {
|
||||
ConfigurableMongoDbMessageStore messageStore = new ConfigurableMongoDbMessageStore(this.clientDbFactory);
|
||||
ConfigurableMongoDbMessageStore messageStore = new ConfigurableMongoDbMessageStore(MONGO_DATABASE_FACTORY);
|
||||
messageStore.setApplicationContext(this.testApplicationContext);
|
||||
messageStore.afterPropertiesSet();
|
||||
ClaimCheckInTransformer checkin = new ClaimCheckInTransformer(messageStore);
|
||||
@@ -113,7 +107,7 @@ public class MongoDbMessageStoreClaimCheckIntegrationTests extends MongoDbAvaila
|
||||
@Test
|
||||
@MongoDbAvailable
|
||||
public void objectPayloadConfigurable() {
|
||||
ConfigurableMongoDbMessageStore messageStore = new ConfigurableMongoDbMessageStore(this.clientDbFactory);
|
||||
ConfigurableMongoDbMessageStore messageStore = new ConfigurableMongoDbMessageStore(MONGO_DATABASE_FACTORY);
|
||||
messageStore.setApplicationContext(this.testApplicationContext);
|
||||
messageStore.afterPropertiesSet();
|
||||
ClaimCheckInTransformer checkin = new ClaimCheckInTransformer(messageStore);
|
||||
|
||||
@@ -39,7 +39,7 @@ public class MongoDbMessageStoreTests extends AbstractMongoDbMessageStoreTests {
|
||||
|
||||
@Override
|
||||
protected MessageStore getMessageStore() {
|
||||
MongoDbMessageStore mongoDbMessageStore = new MongoDbMessageStore(this.clientDbFactory);
|
||||
MongoDbMessageStore mongoDbMessageStore = new MongoDbMessageStore(MONGO_DATABASE_FACTORY);
|
||||
mongoDbMessageStore.afterPropertiesSet();
|
||||
return mongoDbMessageStore;
|
||||
}
|
||||
@@ -47,7 +47,7 @@ public class MongoDbMessageStoreTests extends AbstractMongoDbMessageStoreTests {
|
||||
@Test
|
||||
@MongoDbAvailable
|
||||
public void testCustomConverter() throws InterruptedException {
|
||||
MongoDbMessageStore mongoDbMessageStore = new MongoDbMessageStore(this.clientDbFactory);
|
||||
MongoDbMessageStore mongoDbMessageStore = new MongoDbMessageStore(MONGO_DATABASE_FACTORY);
|
||||
FooToBytesConverter fooToBytesConverter = new FooToBytesConverter();
|
||||
mongoDbMessageStore.setCustomConverters(fooToBytesConverter);
|
||||
mongoDbMessageStore.afterPropertiesSet();
|
||||
|
||||
@@ -17,18 +17,7 @@
|
||||
</int:channel>
|
||||
|
||||
<bean id="mongoStore" class="org.springframework.integration.mongodb.store.MongoDbMessageStore">
|
||||
<constructor-arg ref="mongoConnectionFactory"/>
|
||||
</bean>
|
||||
|
||||
<bean id="mongoConnectionFactory" class="org.springframework.data.mongodb.core.SimpleMongoClientDatabaseFactory">
|
||||
<constructor-arg>
|
||||
<bean class="org.springframework.data.mongodb.core.MongoClientFactoryBean">
|
||||
<property name="mongoClientSettings">
|
||||
<bean class="org.springframework.data.mongodb.core.MongoClientSettingsFactoryBean"/>
|
||||
</property>
|
||||
</bean>
|
||||
</constructor-arg>
|
||||
<constructor-arg value="test"/>
|
||||
<constructor-arg value="#{T (org.springframework.integration.mongodb.store.MongoDbMessageGroupStoreTests).MONGO_DATABASE_FACTORY}"/>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
||||
@@ -17,18 +17,8 @@
|
||||
</int:channel>
|
||||
|
||||
<bean id="mongoStore" class="org.springframework.integration.mongodb.store.ConfigurableMongoDbMessageStore">
|
||||
<constructor-arg ref="mongoConnectionFactory"/>
|
||||
</bean>
|
||||
|
||||
<bean id="mongoConnectionFactory" class="org.springframework.data.mongodb.core.SimpleMongoClientDatabaseFactory">
|
||||
<constructor-arg>
|
||||
<bean class="org.springframework.data.mongodb.core.MongoClientFactoryBean">
|
||||
<property name="mongoClientSettings">
|
||||
<bean class="org.springframework.data.mongodb.core.MongoClientSettingsFactoryBean"/>
|
||||
</property>
|
||||
</bean>
|
||||
</constructor-arg>
|
||||
<constructor-arg value="test"/>
|
||||
<constructor-arg
|
||||
value="#{T (org.springframework.integration.mongodb.store.ConfigurableMongoDbMessageGroupStoreTests).MONGO_DATABASE_FACTORY}"/>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
||||
Reference in New Issue
Block a user