File tree 1 file changed +5
-3
lines changed
src/test/java/org/springframework/data/elasticsearch/core/routing
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 29
29
import org .springframework .data .elasticsearch .annotations .Document ;
30
30
import org .springframework .data .elasticsearch .annotations .Routing ;
31
31
import org .springframework .data .elasticsearch .annotations .Setting ;
32
+ import org .springframework .data .elasticsearch .core .AbstractElasticsearchTemplate ;
32
33
import org .springframework .data .elasticsearch .core .ElasticsearchOperations ;
33
34
import org .springframework .data .elasticsearch .core .IndexOperations ;
34
35
import org .springframework .data .elasticsearch .core .SearchHits ;
35
36
import org .springframework .data .elasticsearch .core .mapping .IndexCoordinates ;
37
+ import org .springframework .data .elasticsearch .core .mapping .SimpleElasticsearchMappingContext ;
36
38
import org .springframework .data .elasticsearch .core .query .Query ;
37
39
import org .springframework .data .elasticsearch .junit .jupiter .ElasticsearchRestTemplateConfiguration ;
38
40
import org .springframework .data .elasticsearch .junit .jupiter .SpringIntegrationTest ;
@@ -121,16 +123,16 @@ void shouldStoreDataWithDifferentRoutingAndGetTheRoutingInTheSearchResult() {
121
123
122
124
@ Test
123
125
void shouldCreateACopyOfTheClientWithRefreshPolicy () {
124
- //given
126
+ // given
125
127
AbstractElasticsearchTemplate sourceTemplate = (AbstractElasticsearchTemplate ) operations ;
126
128
SimpleElasticsearchMappingContext mappingContext = new SimpleElasticsearchMappingContext ();
127
129
DefaultRoutingResolver defaultRoutingResolver = new DefaultRoutingResolver (mappingContext );
128
130
129
- //when
131
+ // when
130
132
ElasticsearchOperations operationsCopy = this .operations .withRouting (defaultRoutingResolver );
131
133
AbstractElasticsearchTemplate copyTemplate = (AbstractElasticsearchTemplate ) operationsCopy ;
132
134
133
- //then
135
+ // then
134
136
assertThat (sourceTemplate .getRefreshPolicy ()).isEqualTo (copyTemplate .getRefreshPolicy ());
135
137
}
136
138
You can’t perform that action at this time.
0 commit comments