Fix Elasticsearch template condition if no client is defined
This commit makes sure to backoff if a Client bean is not available. Closes gh-10143
This commit is contained in:
@@ -46,6 +46,14 @@ public class ElasticsearchDataAutoConfigurationTests {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void templateBackOffWithNoClient() {
|
||||
this.context = new AnnotationConfigApplicationContext(
|
||||
ElasticsearchDataAutoConfiguration.class);
|
||||
assertThat(this.context.getBeanNamesForType(ElasticsearchTemplate.class))
|
||||
.isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void templateExists() {
|
||||
load("spring.data.elasticsearch.properties.path.data:target/data",
|
||||
|
||||
Reference in New Issue
Block a user