Upgrade dependencies
* Gradle 6.1.1 * MongoDb 4.0 * Other Spring dependencies to `BUILD-SNAPSHOT` * Fix MongoDb tests according latest Spring Data * State in the docs that both MongoDb driver are `optional` now in the dependencies
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.springframework.integration.mongodb.dsl;
|
||||
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.MongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.ReactiveMongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.MongoOperations;
|
||||
import org.springframework.data.mongodb.core.ReactiveMongoOperations;
|
||||
@@ -37,13 +37,13 @@ public final class MongoDb {
|
||||
|
||||
/**
|
||||
* Create a {@link MongoDbOutboundGatewaySpec} builder instance
|
||||
* based on the provided {@link MongoDbFactory} and {@link MongoConverter}.
|
||||
* @param mongoDbFactory the {@link MongoDbFactory} to use.
|
||||
* based on the provided {@link MongoDatabaseFactory} and {@link MongoConverter}.
|
||||
* @param mongoDbFactory the {@link MongoDatabaseFactory} to use.
|
||||
* @param mongoConverter the {@link MongoConverter} to use.
|
||||
* @return the {@link MongoDbOutboundGatewaySpec} instance
|
||||
*/
|
||||
public static MongoDbOutboundGatewaySpec outboundGateway(
|
||||
MongoDbFactory mongoDbFactory, MongoConverter mongoConverter) {
|
||||
MongoDatabaseFactory mongoDbFactory, MongoConverter mongoConverter) {
|
||||
|
||||
return new MongoDbOutboundGatewaySpec(mongoDbFactory, mongoConverter);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.springframework.integration.mongodb.dsl;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.MongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.MongoOperations;
|
||||
import org.springframework.data.mongodb.core.convert.MongoConverter;
|
||||
import org.springframework.data.mongodb.core.query.Query;
|
||||
@@ -40,7 +40,7 @@ import org.springframework.messaging.Message;
|
||||
public class MongoDbOutboundGatewaySpec
|
||||
extends MessageHandlerSpec<MongoDbOutboundGatewaySpec, MongoDbOutboundGateway> {
|
||||
|
||||
MongoDbOutboundGatewaySpec(MongoDbFactory mongoDbFactory, MongoConverter mongoConverter) {
|
||||
MongoDbOutboundGatewaySpec(MongoDatabaseFactory mongoDbFactory, MongoConverter mongoConverter) {
|
||||
this.target = new MongoDbOutboundGateway(mongoDbFactory, mongoConverter);
|
||||
this.target.setRequiresReply(true);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.springframework.integration.mongodb.inbound;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.MongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.MongoOperations;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.convert.MongoConverter;
|
||||
@@ -67,7 +67,7 @@ import com.mongodb.DBObject;
|
||||
public class MongoDbMessageSource extends AbstractMessageSource<Object> {
|
||||
|
||||
@Nullable
|
||||
private final MongoDbFactory mongoDbFactory;
|
||||
private final MongoDatabaseFactory mongoDbFactory;
|
||||
|
||||
private final Expression queryExpression;
|
||||
|
||||
@@ -86,13 +86,13 @@ public class MongoDbMessageSource extends AbstractMessageSource<Object> {
|
||||
private volatile boolean initialized = false;
|
||||
|
||||
/**
|
||||
* Creates an instance with the provided {@link MongoDbFactory} and SpEL expression
|
||||
* Creates an instance with the provided {@link MongoDatabaseFactory} and SpEL expression
|
||||
* which should resolve to a MongoDb 'query' string (see https://www.mongodb.org/display/DOCS/Querying).
|
||||
* The 'queryExpression' will be evaluated on every call to the {@link #receive()} method.
|
||||
* @param mongoDbFactory The mongodb factory.
|
||||
* @param queryExpression The query expression.
|
||||
*/
|
||||
public MongoDbMessageSource(MongoDbFactory mongoDbFactory, Expression queryExpression) {
|
||||
public MongoDbMessageSource(MongoDatabaseFactory mongoDbFactory, Expression queryExpression) {
|
||||
Assert.notNull(mongoDbFactory, "'mongoDbFactory' must not be null");
|
||||
Assert.notNull(queryExpression, "'queryExpression' must not be null");
|
||||
this.mongoDbFactory = mongoDbFactory;
|
||||
@@ -154,7 +154,7 @@ public class MongoDbMessageSource extends AbstractMessageSource<Object> {
|
||||
/**
|
||||
* Allows you to provide a custom {@link MongoConverter} used to assist in deserialization
|
||||
* data read from MongoDb. Only allowed if this instance was constructed with a
|
||||
* {@link MongoDbFactory}.
|
||||
* {@link MongoDatabaseFactory}.
|
||||
* @param mongoConverter The mongo converter.
|
||||
*/
|
||||
public void setMongoConverter(MongoConverter mongoConverter) {
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.Map;
|
||||
|
||||
import org.bson.Document;
|
||||
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.MongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.FindAndModifyOptions;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.query.Criteria;
|
||||
@@ -58,21 +58,21 @@ public class MongoDbMetadataStore implements ConcurrentMetadataStore {
|
||||
private final String collectionName;
|
||||
|
||||
/**
|
||||
* Configure the MongoDbMetadataStore by provided {@link MongoDbFactory} and
|
||||
* Configure the MongoDbMetadataStore by provided {@link MongoDatabaseFactory} and
|
||||
* default collection name - {@link #DEFAULT_COLLECTION_NAME}.
|
||||
* @param factory the mongodb factory
|
||||
*/
|
||||
public MongoDbMetadataStore(MongoDbFactory factory) {
|
||||
public MongoDbMetadataStore(MongoDatabaseFactory factory) {
|
||||
this(factory, DEFAULT_COLLECTION_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure the MongoDbMetadataStore by provided {@link MongoDbFactory} and
|
||||
* Configure the MongoDbMetadataStore by provided {@link MongoDatabaseFactory} and
|
||||
* collection name
|
||||
* @param factory the mongodb factory
|
||||
* @param collectionName the collection name where it persists the data
|
||||
*/
|
||||
public MongoDbMetadataStore(MongoDbFactory factory, String collectionName) {
|
||||
public MongoDbMetadataStore(MongoDatabaseFactory factory, String collectionName) {
|
||||
this(new MongoTemplate(factory), collectionName);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.springframework.integration.mongodb.outbound;
|
||||
|
||||
import org.bson.Document;
|
||||
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.MongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.MongoOperations;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.convert.DefaultDbRefResolver;
|
||||
@@ -46,7 +46,7 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class MongoDbOutboundGateway extends AbstractReplyProducingMessageHandler {
|
||||
|
||||
private MongoDbFactory mongoDbFactory;
|
||||
private MongoDatabaseFactory mongoDbFactory;
|
||||
|
||||
private MongoConverter mongoConverter;
|
||||
|
||||
@@ -64,12 +64,12 @@ public class MongoDbOutboundGateway extends AbstractReplyProducingMessageHandler
|
||||
|
||||
private Expression collectionNameExpression;
|
||||
|
||||
public MongoDbOutboundGateway(MongoDbFactory mongoDbFactory) {
|
||||
public MongoDbOutboundGateway(MongoDatabaseFactory mongoDbFactory) {
|
||||
this(mongoDbFactory, new MappingMongoConverter(new DefaultDbRefResolver(mongoDbFactory),
|
||||
new MongoMappingContext()));
|
||||
}
|
||||
|
||||
public MongoDbOutboundGateway(MongoDbFactory mongoDbFactory, MongoConverter mongoConverter) {
|
||||
public MongoDbOutboundGateway(MongoDatabaseFactory mongoDbFactory, MongoConverter mongoConverter) {
|
||||
Assert.notNull(mongoDbFactory, "mongoDatabaseFactory must not be null.");
|
||||
Assert.notNull(mongoConverter, "mongoConverter must not be null.");
|
||||
this.mongoDbFactory = mongoDbFactory;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.springframework.integration.mongodb.outbound;
|
||||
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.MongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.MongoOperations;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.convert.MongoConverter;
|
||||
@@ -42,7 +42,7 @@ public class MongoDbStoringMessageHandler extends AbstractMessageHandler {
|
||||
|
||||
private volatile MongoOperations mongoTemplate;
|
||||
|
||||
private volatile MongoDbFactory mongoDbFactory;
|
||||
private volatile MongoDatabaseFactory mongoDbFactory;
|
||||
|
||||
private volatile MongoConverter mongoConverter;
|
||||
|
||||
@@ -53,11 +53,11 @@ public class MongoDbStoringMessageHandler extends AbstractMessageHandler {
|
||||
private volatile boolean initialized = false;
|
||||
|
||||
/**
|
||||
* Will construct this instance using provided {@link MongoDbFactory}
|
||||
* Will construct this instance using provided {@link MongoDatabaseFactory}
|
||||
*
|
||||
* @param mongoDbFactory The mongodb factory.
|
||||
*/
|
||||
public MongoDbStoringMessageHandler(MongoDbFactory mongoDbFactory) {
|
||||
public MongoDbStoringMessageHandler(MongoDatabaseFactory mongoDbFactory) {
|
||||
Assert.notNull(mongoDbFactory, "'mongoDbFactory' must not be null");
|
||||
|
||||
this.mongoDbFactory = mongoDbFactory;
|
||||
@@ -78,7 +78,7 @@ public class MongoDbStoringMessageHandler extends AbstractMessageHandler {
|
||||
/**
|
||||
* Allows you to provide custom {@link MongoConverter} used to assist in serialization
|
||||
* of data written to MongoDb. Only allowed if this instance was constructed with a
|
||||
* {@link MongoDbFactory}.
|
||||
* {@link MongoDatabaseFactory}.
|
||||
*
|
||||
* @param mongoConverter The mongo converter.
|
||||
*/
|
||||
|
||||
@@ -32,7 +32,7 @@ import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.dao.DuplicateKeyException;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.MongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.FindAndModifyOptions;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.convert.DefaultDbRefResolver;
|
||||
@@ -76,7 +76,7 @@ public abstract class AbstractConfigurableMongoDbMessageStore extends AbstractMe
|
||||
|
||||
protected final String collectionName; // NOSONAR - final
|
||||
|
||||
protected final MongoDbFactory mongoDbFactory; // NOSONAR - final
|
||||
protected final MongoDatabaseFactory mongoDbFactory; // NOSONAR - final
|
||||
|
||||
private MongoTemplate mongoTemplate;
|
||||
|
||||
@@ -94,11 +94,11 @@ public abstract class AbstractConfigurableMongoDbMessageStore extends AbstractMe
|
||||
this.mongoDbFactory = null;
|
||||
}
|
||||
|
||||
public AbstractConfigurableMongoDbMessageStore(MongoDbFactory mongoDbFactory, String collectionName) {
|
||||
public AbstractConfigurableMongoDbMessageStore(MongoDatabaseFactory mongoDbFactory, String collectionName) {
|
||||
this(mongoDbFactory, null, collectionName);
|
||||
}
|
||||
|
||||
public AbstractConfigurableMongoDbMessageStore(MongoDbFactory mongoDbFactory,
|
||||
public AbstractConfigurableMongoDbMessageStore(MongoDatabaseFactory mongoDbFactory,
|
||||
MappingMongoConverter mappingMongoConverter, String collectionName) {
|
||||
Assert.notNull(mongoDbFactory, "'mongoDbFactory' must not be null");
|
||||
Assert.hasText(collectionName, "'collectionName' must not be empty");
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.stream.Collectors;
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.MongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.convert.MappingMongoConverter;
|
||||
import org.springframework.data.mongodb.core.query.Criteria;
|
||||
@@ -68,19 +68,19 @@ public class ConfigurableMongoDbMessageStore extends AbstractConfigurableMongoDb
|
||||
super(mongoTemplate, collectionName);
|
||||
}
|
||||
|
||||
public ConfigurableMongoDbMessageStore(MongoDbFactory mongoDbFactory) {
|
||||
public ConfigurableMongoDbMessageStore(MongoDatabaseFactory mongoDbFactory) {
|
||||
this(mongoDbFactory, null, DEFAULT_COLLECTION_NAME);
|
||||
}
|
||||
|
||||
public ConfigurableMongoDbMessageStore(MongoDbFactory mongoDbFactory, MappingMongoConverter mappingMongoConverter) {
|
||||
public ConfigurableMongoDbMessageStore(MongoDatabaseFactory mongoDbFactory, MappingMongoConverter mappingMongoConverter) {
|
||||
this(mongoDbFactory, mappingMongoConverter, DEFAULT_COLLECTION_NAME);
|
||||
}
|
||||
|
||||
public ConfigurableMongoDbMessageStore(MongoDbFactory mongoDbFactory, String collectionName) {
|
||||
public ConfigurableMongoDbMessageStore(MongoDatabaseFactory mongoDbFactory, String collectionName) {
|
||||
this(mongoDbFactory, null, collectionName);
|
||||
}
|
||||
|
||||
public ConfigurableMongoDbMessageStore(MongoDbFactory mongoDbFactory, MappingMongoConverter mappingMongoConverter,
|
||||
public ConfigurableMongoDbMessageStore(MongoDatabaseFactory mongoDbFactory, MappingMongoConverter mappingMongoConverter,
|
||||
String collectionName) {
|
||||
|
||||
super(mongoDbFactory, mappingMongoConverter, collectionName);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package org.springframework.integration.mongodb.store;
|
||||
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.MongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.convert.MappingMongoConverter;
|
||||
import org.springframework.data.mongodb.core.index.Index;
|
||||
@@ -61,19 +61,19 @@ public class MongoDbChannelMessageStore extends AbstractConfigurableMongoDbMessa
|
||||
super(mongoTemplate, collectionName);
|
||||
}
|
||||
|
||||
public MongoDbChannelMessageStore(MongoDbFactory mongoDbFactory) {
|
||||
public MongoDbChannelMessageStore(MongoDatabaseFactory mongoDbFactory) {
|
||||
this(mongoDbFactory, null, DEFAULT_COLLECTION_NAME);
|
||||
}
|
||||
|
||||
public MongoDbChannelMessageStore(MongoDbFactory mongoDbFactory, MappingMongoConverter mappingMongoConverter) {
|
||||
public MongoDbChannelMessageStore(MongoDatabaseFactory mongoDbFactory, MappingMongoConverter mappingMongoConverter) {
|
||||
this(mongoDbFactory, mappingMongoConverter, DEFAULT_COLLECTION_NAME);
|
||||
}
|
||||
|
||||
public MongoDbChannelMessageStore(MongoDbFactory mongoDbFactory, String collectionName) {
|
||||
public MongoDbChannelMessageStore(MongoDatabaseFactory mongoDbFactory, String collectionName) {
|
||||
this(mongoDbFactory, null, collectionName);
|
||||
}
|
||||
|
||||
public MongoDbChannelMessageStore(MongoDbFactory mongoDbFactory, MappingMongoConverter mappingMongoConverter,
|
||||
public MongoDbChannelMessageStore(MongoDatabaseFactory mongoDbFactory, MappingMongoConverter mappingMongoConverter,
|
||||
String collectionName) {
|
||||
super(mongoDbFactory, mappingMongoConverter, collectionName);
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ import org.springframework.data.convert.ReadingConverter;
|
||||
import org.springframework.data.convert.WritingConverter;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.mapping.context.MappingContext;
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.MongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.BulkOperations;
|
||||
import org.springframework.data.mongodb.core.FindAndModifyOptions;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
@@ -141,19 +141,19 @@ public class MongoDbMessageStore extends AbstractMessageGroupStore
|
||||
private String[] whiteListPatterns;
|
||||
|
||||
/**
|
||||
* Create a MongoDbMessageStore using the provided {@link MongoDbFactory}.and the default collection name.
|
||||
* Create a MongoDbMessageStore using the provided {@link MongoDatabaseFactory}.and the default collection name.
|
||||
* @param mongoDbFactory The mongodb factory.
|
||||
*/
|
||||
public MongoDbMessageStore(MongoDbFactory mongoDbFactory) {
|
||||
public MongoDbMessageStore(MongoDatabaseFactory mongoDbFactory) {
|
||||
this(mongoDbFactory, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a MongoDbMessageStore using the provided {@link MongoDbFactory} and collection name.
|
||||
* Create a MongoDbMessageStore using the provided {@link MongoDatabaseFactory} and collection name.
|
||||
* @param mongoDbFactory The mongodb factory.
|
||||
* @param collectionName The collection name.
|
||||
*/
|
||||
public MongoDbMessageStore(MongoDbFactory mongoDbFactory, @Nullable String collectionName) {
|
||||
public MongoDbMessageStore(MongoDatabaseFactory mongoDbFactory, @Nullable String collectionName) {
|
||||
Assert.notNull(mongoDbFactory, "mongoDbFactory must not be null");
|
||||
this.converter = new MessageReadingMongoConverter(mongoDbFactory, new MongoMappingContext());
|
||||
this.template = new MongoTemplate(mongoDbFactory, this.converter);
|
||||
@@ -523,7 +523,7 @@ public class MongoDbMessageStore extends AbstractMessageGroupStore
|
||||
|
||||
private Object[] customConverters;
|
||||
|
||||
MessageReadingMongoConverter(MongoDbFactory mongoDbFactory,
|
||||
MessageReadingMongoConverter(MongoDatabaseFactory mongoDbFactory,
|
||||
MappingContext<? extends MongoPersistentEntity<?>, MongoPersistentProperty> mappingContext) {
|
||||
super(new DefaultDbRefResolver(mongoDbFactory), mappingContext);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.parsing.BeanDefinitionParsingException;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.MongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.convert.MongoConverter;
|
||||
import org.springframework.expression.common.LiteralExpression;
|
||||
@@ -49,7 +49,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
public class MongoDbInboundChannelAdapterParserTests {
|
||||
|
||||
@Autowired
|
||||
private MongoDbFactory mongoDbFactory;
|
||||
private MongoDatabaseFactory mongoDbFactory;
|
||||
|
||||
@Autowired
|
||||
private MongoConverter mongoConverter;
|
||||
|
||||
@@ -21,7 +21,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.MongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.query.BasicQuery;
|
||||
import org.springframework.integration.mongodb.rules.MongoDbAvailable;
|
||||
@@ -49,7 +49,7 @@ public class MongoDbOutboundChannelAdapterIntegrationTests extends MongoDbAvaila
|
||||
Message<Person> message = new GenericMessage<MongoDbAvailableTests.Person>(this.createPerson("Bob"));
|
||||
channel.send(message);
|
||||
|
||||
MongoDbFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
MongoDatabaseFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
MongoTemplate template = new MongoTemplate(mongoDbFactory);
|
||||
assertThat(template.find(new BasicQuery("{'name' : 'Bob'}"), Person.class, "data")).isNotNull();
|
||||
context.close();
|
||||
@@ -58,7 +58,7 @@ public class MongoDbOutboundChannelAdapterIntegrationTests extends MongoDbAvaila
|
||||
@Test
|
||||
@MongoDbAvailable
|
||||
public void testWithNamedCollection() throws Exception {
|
||||
MongoDbFactory mongoDbFactory = this.prepareMongoFactory("foo");
|
||||
MongoDatabaseFactory mongoDbFactory = this.prepareMongoFactory("foo");
|
||||
ClassPathXmlApplicationContext context =
|
||||
new ClassPathXmlApplicationContext("outbound-adapter-config.xml", this.getClass());
|
||||
|
||||
@@ -77,7 +77,7 @@ public class MongoDbOutboundChannelAdapterIntegrationTests extends MongoDbAvaila
|
||||
@Test
|
||||
@MongoDbAvailable
|
||||
public void testWithTemplate() throws Exception {
|
||||
MongoDbFactory mongoDbFactory = this.prepareMongoFactory("foo");
|
||||
MongoDatabaseFactory mongoDbFactory = this.prepareMongoFactory("foo");
|
||||
ClassPathXmlApplicationContext context =
|
||||
new ClassPathXmlApplicationContext("outbound-adapter-config.xml", this.getClass());
|
||||
|
||||
@@ -100,7 +100,7 @@ public class MongoDbOutboundChannelAdapterIntegrationTests extends MongoDbAvaila
|
||||
|
||||
BasicDBObject dbObject = BasicDBObject.parse("{'foo' : 'bar'}");
|
||||
|
||||
MongoDbFactory mongoDbFactory = this.prepareMongoFactory("foo");
|
||||
MongoDatabaseFactory mongoDbFactory = this.prepareMongoFactory("foo");
|
||||
ClassPathXmlApplicationContext context =
|
||||
new ClassPathXmlApplicationContext("outbound-adapter-config.xml", this.getClass());
|
||||
|
||||
@@ -124,7 +124,7 @@ public class MongoDbOutboundChannelAdapterIntegrationTests extends MongoDbAvaila
|
||||
|
||||
String object = "{'foo' : 'bar'}";
|
||||
|
||||
MongoDbFactory mongoDbFactory = this.prepareMongoFactory("foo");
|
||||
MongoDatabaseFactory mongoDbFactory = this.prepareMongoFactory("foo");
|
||||
ClassPathXmlApplicationContext context =
|
||||
new ClassPathXmlApplicationContext("outbound-adapter-config.xml", this.getClass());
|
||||
|
||||
@@ -152,7 +152,7 @@ public class MongoDbOutboundChannelAdapterIntegrationTests extends MongoDbAvaila
|
||||
Message<Person> message = new GenericMessage<MongoDbAvailableTests.Person>(this.createPerson("Bob"));
|
||||
channel.send(message);
|
||||
|
||||
MongoDbFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
MongoDatabaseFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
MongoTemplate template = new MongoTemplate(mongoDbFactory);
|
||||
assertThat(template.find(new BasicQuery("{'name' : 'Bob'}"), Person.class, "data")).isNotNull();
|
||||
context.close();
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.parsing.BeanDefinitionParsingException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.MongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.convert.MongoConverter;
|
||||
import org.springframework.expression.common.LiteralExpression;
|
||||
import org.springframework.expression.spel.standard.SpelExpression;
|
||||
@@ -55,7 +55,7 @@ public class MongoDbOutboundGatewayParserTests {
|
||||
private ApplicationContext context;
|
||||
|
||||
@Autowired
|
||||
private MongoDbFactory mongoDbFactory;
|
||||
private MongoDatabaseFactory mongoDbFactory;
|
||||
|
||||
@Autowired
|
||||
private MongoConverter mongoConverter;
|
||||
|
||||
@@ -32,7 +32,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.MongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.BulkOperations;
|
||||
import org.springframework.data.mongodb.core.MongoOperations;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
@@ -345,7 +345,7 @@ public class MongoDbTests extends MongoDbAvailableTests {
|
||||
}
|
||||
|
||||
@Bean
|
||||
public MongoDbFactory mongoDbFactory() {
|
||||
public MongoDatabaseFactory mongoDbFactory() {
|
||||
return MONGO_DATABASE_FACTORY;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.junit.Test;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.MongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.MongoOperations;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.convert.MappingMongoConverter;
|
||||
@@ -58,7 +58,7 @@ public class MongoDbMessageSourceTests extends MongoDbAvailableTests {
|
||||
@Test
|
||||
public void withNullMongoDBFactory() {
|
||||
assertThatIllegalArgumentException()
|
||||
.isThrownBy(() -> new MongoDbMessageSource((MongoDbFactory) null, mock(Expression.class)));
|
||||
.isThrownBy(() -> new MongoDbMessageSource((MongoDatabaseFactory) null, mock(Expression.class)));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -70,13 +70,13 @@ public class MongoDbMessageSourceTests extends MongoDbAvailableTests {
|
||||
@Test
|
||||
public void withNullQueryExpression() {
|
||||
assertThatIllegalArgumentException()
|
||||
.isThrownBy(() -> new MongoDbMessageSource(mock(MongoDbFactory.class), null));
|
||||
.isThrownBy(() -> new MongoDbMessageSource(mock(MongoDatabaseFactory.class), null));
|
||||
}
|
||||
|
||||
@Test
|
||||
@MongoDbAvailable
|
||||
public void validateSuccessfulQueryWithSingleElementIfOneInListAsDbObject() {
|
||||
MongoDbFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
MongoDatabaseFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
|
||||
MongoTemplate template = new MongoTemplate(mongoDbFactory);
|
||||
template.save(this.createPerson(), "data");
|
||||
@@ -96,7 +96,7 @@ public class MongoDbMessageSourceTests extends MongoDbAvailableTests {
|
||||
@Test
|
||||
@MongoDbAvailable
|
||||
public void validateSuccessfulQueryWithSingleElementIfOneInList() {
|
||||
MongoDbFactory mongoDbFactory = prepareMongoFactory();
|
||||
MongoDatabaseFactory mongoDbFactory = prepareMongoFactory();
|
||||
|
||||
MongoTemplate template = new MongoTemplate(mongoDbFactory);
|
||||
template.save(this.createPerson(), "data");
|
||||
@@ -117,7 +117,7 @@ public class MongoDbMessageSourceTests extends MongoDbAvailableTests {
|
||||
@Test
|
||||
@MongoDbAvailable
|
||||
public void validateSuccessfulQueryWithSingleElementIfOneInListAndSingleResult() {
|
||||
MongoDbFactory mongoDbFactory = prepareMongoFactory();
|
||||
MongoDatabaseFactory mongoDbFactory = prepareMongoFactory();
|
||||
|
||||
MongoTemplate template = new MongoTemplate(mongoDbFactory);
|
||||
template.save(this.createPerson(), "data");
|
||||
@@ -138,7 +138,7 @@ public class MongoDbMessageSourceTests extends MongoDbAvailableTests {
|
||||
@Test
|
||||
@MongoDbAvailable
|
||||
public void validateSuccessfulSubObjectQueryWithSingleElementIfOneInList() {
|
||||
MongoDbFactory mongoDbFactory = prepareMongoFactory();
|
||||
MongoDatabaseFactory mongoDbFactory = prepareMongoFactory();
|
||||
|
||||
MongoTemplate template = new MongoTemplate(mongoDbFactory);
|
||||
template.save(this.createPerson(), "data");
|
||||
@@ -180,7 +180,7 @@ public class MongoDbMessageSourceTests extends MongoDbAvailableTests {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private List<Person> queryMultipleElements(Expression queryExpression) {
|
||||
MongoDbFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
MongoDatabaseFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
|
||||
MongoTemplate template = new MongoTemplate(mongoDbFactory);
|
||||
template.save(this.createPerson("Manny"), "data");
|
||||
@@ -198,7 +198,7 @@ public class MongoDbMessageSourceTests extends MongoDbAvailableTests {
|
||||
@MongoDbAvailable
|
||||
public void validateSuccessfulQueryWithNullReturn() {
|
||||
|
||||
MongoDbFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
MongoDatabaseFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
|
||||
MongoTemplate template = new MongoTemplate(mongoDbFactory);
|
||||
template.save(this.createPerson("Manny"), "data");
|
||||
@@ -217,7 +217,7 @@ public class MongoDbMessageSourceTests extends MongoDbAvailableTests {
|
||||
@MongoDbAvailable
|
||||
public void validateSuccessfulQueryWithCustomConverter() {
|
||||
|
||||
MongoDbFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
MongoDatabaseFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
|
||||
MongoTemplate template = new MongoTemplate(mongoDbFactory);
|
||||
template.save(this.createPerson("Manny"), "data");
|
||||
@@ -243,7 +243,7 @@ public class MongoDbMessageSourceTests extends MongoDbAvailableTests {
|
||||
@MongoDbAvailable
|
||||
public void validateSuccessfulQueryWithMongoTemplate() {
|
||||
|
||||
MongoDbFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
MongoDatabaseFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
|
||||
MappingMongoConverter converter = new TestMongoConverter(mongoDbFactory, new MongoMappingContext());
|
||||
converter.afterPropertiesSet();
|
||||
@@ -269,7 +269,7 @@ public class MongoDbMessageSourceTests extends MongoDbAvailableTests {
|
||||
@MongoDbAvailable
|
||||
public void validatePipelineInModifyOut() {
|
||||
|
||||
MongoDbFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
MongoDatabaseFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
|
||||
MongoTemplate template = new MongoTemplate(mongoDbFactory);
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.MongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.integration.mongodb.rules.MongoDbAvailable;
|
||||
import org.springframework.integration.mongodb.rules.MongoDbAvailableTests;
|
||||
@@ -45,7 +45,7 @@ public class MongoDbMetadataStoreTests extends MongoDbAvailableTests {
|
||||
|
||||
@Before
|
||||
public void configure() {
|
||||
final MongoDbFactory mongoDbFactory = this.prepareMongoFactory(DEFAULT_COLLECTION_NAME);
|
||||
final MongoDatabaseFactory mongoDbFactory = this.prepareMongoFactory(DEFAULT_COLLECTION_NAME);
|
||||
this.store = new MongoDbMetadataStore(mongoDbFactory);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class MongoDbMetadataStoreTests extends MongoDbAvailableTests {
|
||||
@Test
|
||||
public void testConfigureCustomCollection() {
|
||||
final String collectionName = "testMetadataStore";
|
||||
final MongoDbFactory mongoDbFactory = this.prepareMongoFactory(collectionName);
|
||||
final MongoDatabaseFactory mongoDbFactory = this.prepareMongoFactory(collectionName);
|
||||
final MongoTemplate template = new MongoTemplate(mongoDbFactory);
|
||||
store = new MongoDbMetadataStore(template, collectionName);
|
||||
testBasics();
|
||||
@@ -62,7 +62,7 @@ public class MongoDbMetadataStoreTests extends MongoDbAvailableTests {
|
||||
@MongoDbAvailable
|
||||
@Test
|
||||
public void testConfigureFactory() {
|
||||
final MongoDbFactory mongoDbFactory = this.prepareMongoFactory(DEFAULT_COLLECTION_NAME);
|
||||
final MongoDatabaseFactory mongoDbFactory = this.prepareMongoFactory(DEFAULT_COLLECTION_NAME);
|
||||
store = new MongoDbMetadataStore(mongoDbFactory);
|
||||
testBasics();
|
||||
}
|
||||
@@ -71,7 +71,7 @@ public class MongoDbMetadataStoreTests extends MongoDbAvailableTests {
|
||||
@Test
|
||||
public void testConfigureFactorCustomCollection() {
|
||||
final String collectionName = "testMetadataStore";
|
||||
final MongoDbFactory mongoDbFactory = this.prepareMongoFactory(collectionName);
|
||||
final MongoDatabaseFactory mongoDbFactory = this.prepareMongoFactory(collectionName);
|
||||
store = new MongoDbMetadataStore(mongoDbFactory, collectionName);
|
||||
testBasics();
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package org.springframework.integration.mongodb.outbound;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
import java.util.Arrays;
|
||||
@@ -31,7 +32,7 @@ import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.MongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.BulkOperations;
|
||||
import org.springframework.data.mongodb.core.MongoOperations;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
@@ -50,7 +51,7 @@ import org.springframework.test.annotation.DirtiesContext;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
/**
|
||||
* @author Xavier Padr?
|
||||
* @author Xavier Padro
|
||||
* @author Gary Rssell
|
||||
* @author Artem Bilan
|
||||
*
|
||||
@@ -74,7 +75,7 @@ public class MongoDbOutboundGatewayTests extends MongoDbAvailableTests {
|
||||
private MongoConverter mongoConverter;
|
||||
|
||||
@Autowired
|
||||
private MongoDbFactory mongoDbFactory;
|
||||
private MongoDatabaseFactory mongoDbFactory;
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
@@ -95,14 +96,9 @@ public class MongoDbOutboundGatewayTests extends MongoDbAvailableTests {
|
||||
@Test
|
||||
@MongoDbAvailable
|
||||
public void testNoFactorySpecified() {
|
||||
|
||||
try {
|
||||
new MongoDbOutboundGateway((MongoDbFactory) null);
|
||||
fail("Expected the test case to throw an IllegalArgumentException");
|
||||
}
|
||||
catch (IllegalArgumentException e) {
|
||||
assertThat(e.getMessage()).isEqualTo("MongoDbFactory translator must not be null!");
|
||||
}
|
||||
assertThatIllegalArgumentException()
|
||||
.isThrownBy(() -> new MongoDbOutboundGateway((MongoDatabaseFactory) null))
|
||||
.withMessage("MongoDbFactory translator must not be null!");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.MongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.integration.endpoint.EventDrivenConsumer;
|
||||
import org.springframework.integration.mongodb.rules.MongoDbAvailable;
|
||||
@@ -55,7 +55,7 @@ public class MongoDbOutboundGatewayXmlTests extends MongoDbAvailableTests {
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
MongoDbFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
MongoDatabaseFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
MongoTemplate mongoTemplate = new MongoTemplate(mongoDbFactory);
|
||||
|
||||
mongoTemplate.save(this.createPerson("Artem"), COLLECTION_NAME);
|
||||
@@ -66,7 +66,7 @@ public class MongoDbOutboundGatewayXmlTests extends MongoDbAvailableTests {
|
||||
|
||||
@After
|
||||
public void cleanUp() {
|
||||
MongoDbFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
MongoDatabaseFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
MongoTemplate mongoTemplate = new MongoTemplate(mongoDbFactory);
|
||||
|
||||
mongoTemplate.dropCollection(COLLECTION_NAME);
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.junit.Test;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.MongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.MongoOperations;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.convert.MappingMongoConverter;
|
||||
@@ -53,7 +53,7 @@ public class MongoDbStoringMessageHandlerTests extends MongoDbAvailableTests {
|
||||
|
||||
private MongoTemplate template;
|
||||
|
||||
private MongoDbFactory mongoDbFactory;
|
||||
private MongoDatabaseFactory mongoDbFactory;
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
@@ -66,7 +66,7 @@ public class MongoDbStoringMessageHandlerTests extends MongoDbAvailableTests {
|
||||
@MongoDbAvailable
|
||||
public void withNullMongoDBFactory() {
|
||||
assertThatIllegalArgumentException()
|
||||
.isThrownBy(() -> new MongoDbStoringMessageHandler((MongoDbFactory) null));
|
||||
.isThrownBy(() -> new MongoDbStoringMessageHandler((MongoDatabaseFactory) null));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -19,16 +19,17 @@ 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;
|
||||
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.data.mapping.context.MappingContext;
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.MongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.ReactiveMongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.ReactiveMongoTemplate;
|
||||
import org.springframework.data.mongodb.core.SimpleMongoClientDbFactory;
|
||||
import org.springframework.data.mongodb.core.SimpleMongoClientDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.SimpleReactiveMongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.convert.DefaultDbRefResolver;
|
||||
import org.springframework.data.mongodb.core.convert.MappingMongoConverter;
|
||||
@@ -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,14 +60,19 @@ public abstract class MongoDbAvailableTests {
|
||||
@Rule
|
||||
public MongoDbAvailableRule mongoDbAvailableRule = new MongoDbAvailableRule();
|
||||
|
||||
public static final MongoDbFactory MONGO_DATABASE_FACTORY =
|
||||
new SimpleMongoClientDbFactory(MongoClients.create(), "test");
|
||||
public static final MongoDatabaseFactory MONGO_DATABASE_FACTORY =
|
||||
new SimpleMongoClientDatabaseFactory(
|
||||
MongoClients.create(
|
||||
MongoClientSettings.builder().uuidRepresentation(UuidRepresentation.STANDARD).build()),
|
||||
"test");
|
||||
|
||||
public static final ReactiveMongoDatabaseFactory REACTIVE_MONGO_DATABASE_FACTORY =
|
||||
new SimpleReactiveMongoDatabaseFactory(
|
||||
com.mongodb.reactivestreams.client.MongoClients.create(), "test");
|
||||
com.mongodb.reactivestreams.client.MongoClients.create(
|
||||
MongoClientSettings.builder().uuidRepresentation(UuidRepresentation.STANDARD).build()),
|
||||
"test");
|
||||
|
||||
protected MongoDbFactory prepareMongoFactory(String... additionalCollectionsToDrop) {
|
||||
protected MongoDatabaseFactory prepareMongoFactory(String... additionalCollectionsToDrop) {
|
||||
cleanupCollections(MONGO_DATABASE_FACTORY, additionalCollectionsToDrop);
|
||||
return MONGO_DATABASE_FACTORY;
|
||||
}
|
||||
@@ -87,7 +94,7 @@ public abstract class MongoDbAvailableTests {
|
||||
}
|
||||
}
|
||||
|
||||
protected void cleanupCollections(MongoDbFactory mongoDbFactory, String... additionalCollectionsToDrop) {
|
||||
protected void cleanupCollections(MongoDatabaseFactory mongoDbFactory, String... additionalCollectionsToDrop) {
|
||||
MongoTemplate template = new MongoTemplate(mongoDbFactory);
|
||||
template.dropCollection("messages");
|
||||
template.dropCollection("configurableStoreMessages");
|
||||
@@ -182,7 +189,7 @@ public abstract class MongoDbAvailableTests {
|
||||
public static class TestMongoConverter extends MappingMongoConverter {
|
||||
|
||||
public TestMongoConverter(
|
||||
MongoDbFactory mongoDbFactory,
|
||||
MongoDatabaseFactory mongoDbFactory,
|
||||
MappingContext<? extends MongoPersistentEntity<?>, MongoPersistentProperty> mappingContext) {
|
||||
|
||||
super(new DefaultDbRefResolver(mongoDbFactory), mappingContext);
|
||||
|
||||
@@ -417,7 +417,7 @@ public abstract class AbstractMongoDbMessageGroupStoreTests extends MongoDbAvail
|
||||
// @Test
|
||||
// @MongoDbAvailable
|
||||
// public void testConcurrentModifications() throws Exception{
|
||||
// MongoDbFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
// MongoDatabaseFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
// final MongoDbMessageStore store1 = new MongoDbMessageStore(mongoDbFactory);
|
||||
// final MongoDbMessageStore store2 = new MongoDbMessageStore(mongoDbFactory);
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user