mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-15 01:07:30 +08:00
Merge branch '3.1.x' into 3.2.x
Closes gh-40478
This commit is contained in:
commit
3a9ee9f1a7
@ -241,6 +241,12 @@ class MongoAutoConfigurationTests {
|
||||
.doesNotHaveBean(PropertiesMongoConnectionDetails.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
void uuidRepresentationDefaultsAreAligned() {
|
||||
this.contextRunner.run((context) -> assertThat(getSettings(context).getUuidRepresentation())
|
||||
.isEqualTo(new MongoProperties().getUuidRepresentation()));
|
||||
}
|
||||
|
||||
private MongoClientSettings getSettings(AssertableApplicationContext context) {
|
||||
assertThat(context).hasSingleBean(MongoClient.class);
|
||||
MongoClientImpl client = (MongoClientImpl) context.getBean(MongoClient.class);
|
||||
|
@ -253,6 +253,12 @@ class MongoReactiveAutoConfigurationTests {
|
||||
.doesNotHaveBean(PropertiesMongoConnectionDetails.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
void uuidRepresentationDefaultsAreAligned() {
|
||||
this.contextRunner.run((context) -> assertThat(getSettings(context).getUuidRepresentation())
|
||||
.isEqualTo(new MongoProperties().getUuidRepresentation()));
|
||||
}
|
||||
|
||||
private MongoClientSettings getSettings(ApplicationContext context) {
|
||||
MongoClientImpl client = (MongoClientImpl) context.getBean(MongoClient.class);
|
||||
return client.getSettings();
|
||||
|
Loading…
Reference in New Issue
Block a user