Prevent sync client from being created in reactive test config.

Closes #3817
Original pull request: #3987.
This commit is contained in:
Christoph Strobl
2021-09-10 10:34:15 +02:00
committed by Mark Paluch
parent 7df2bdf8ff
commit e064b505c9

View File

@@ -65,7 +65,11 @@ public class MongoTestTemplateConfiguration {
if (converter == null) {
converter = new MappingMongoConverter(new DefaultDbRefResolver(databaseFactory()), mappingContext());
if(dbFactoryConfig.syncClient != null || syncClient != null) {
converter = new MappingMongoConverter(new DefaultDbRefResolver(databaseFactory()), mappingContext());
} else {
converter = new MappingMongoConverter(NoOpDbRefResolver.INSTANCE, mappingContext());
}
if (mongoConverterConfigurer.customConversions != null) {
converter.setCustomConversions(mongoConverterConfigurer.customConversions);