From 17ecf18a157e33e9576b7195e073323ddb3ca703 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 16 Mar 2021 11:32:31 +0000 Subject: [PATCH] Upgrade to MongoDB 4.2.2 Closes gh-25675 --- .../mongo/MongoReactiveAutoConfigurationTests.java | 4 +--- .../autoconfigure/mongo/ReactiveMongoClientFactoryTests.java | 4 +--- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/MongoReactiveAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/MongoReactiveAutoConfigurationTests.java index 5b9d5e65f85..ee2cce609de 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/MongoReactiveAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/MongoReactiveAutoConfigurationTests.java @@ -25,7 +25,6 @@ import com.mongodb.connection.AsynchronousSocketChannelStreamFactoryFactory; import com.mongodb.connection.StreamFactory; import com.mongodb.connection.StreamFactoryFactory; import com.mongodb.connection.netty.NettyStreamFactoryFactory; -import com.mongodb.internal.async.client.AsyncMongoClient; import com.mongodb.reactivestreams.client.MongoClient; import io.netty.channel.EventLoopGroup; import org.junit.jupiter.api.Test; @@ -113,8 +112,7 @@ class MongoReactiveAutoConfigurationTests { private MongoClientSettings getSettings(ApplicationContext context) { MongoClient client = context.getBean(MongoClient.class); - AsyncMongoClient wrappedClient = (AsyncMongoClient) ReflectionTestUtils.getField(client, "wrapped"); - return (MongoClientSettings) ReflectionTestUtils.getField(wrappedClient, "settings"); + return (MongoClientSettings) ReflectionTestUtils.getField(client, "settings"); } @Configuration(proxyBeanMethods = false) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/ReactiveMongoClientFactoryTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/ReactiveMongoClientFactoryTests.java index 337cde39722..312144af9dc 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/ReactiveMongoClientFactoryTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/ReactiveMongoClientFactoryTests.java @@ -19,7 +19,6 @@ package org.springframework.boot.autoconfigure.mongo; import java.util.List; import com.mongodb.MongoClientSettings; -import com.mongodb.internal.async.client.AsyncMongoClient; import com.mongodb.reactivestreams.client.MongoClient; import org.springframework.test.util.ReflectionTestUtils; @@ -41,8 +40,7 @@ class ReactiveMongoClientFactoryTests extends MongoClientFactorySupportTests