Commit bf6f9b4c authored by Madhura Bhave's avatar Madhura Bhave

Polish "Add property for mongo auto-index creation"

See gh-16454
parent 2e9005de
...@@ -92,7 +92,7 @@ public class MongoProperties { ...@@ -92,7 +92,7 @@ public class MongoProperties {
private Class<?> fieldNamingStrategy; private Class<?> fieldNamingStrategy;
/** /**
* Enables/disables auto-index creation. * Whether to enable auto-index creation.
*/ */
private Boolean autoIndexCreation; private Boolean autoIndexCreation;
......
...@@ -135,12 +135,12 @@ public class MongoDataAutoConfigurationTests { ...@@ -135,12 +135,12 @@ public class MongoDataAutoConfigurationTests {
@Test @Test
public void customAutoIndexCreation() { public void customAutoIndexCreation() {
this.contextRunner this.contextRunner
.withPropertyValues("spring.data.mongodb.autoIndexCreation:true") .withPropertyValues("spring.data.mongodb.autoIndexCreation:false")
.run((context) -> { .run((context) -> {
MongoMappingContext mappingContext = context MongoMappingContext mappingContext = context
.getBean(MongoMappingContext.class); .getBean(MongoMappingContext.class);
assertThat(mappingContext.isAutoIndexCreation()) assertThat(mappingContext.isAutoIndexCreation())
.isEqualTo(Boolean.TRUE); .isEqualTo(Boolean.FALSE);
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment