15
15
*/
16
16
package org .springframework .data .elasticsearch .repository .config ;
17
17
18
- import static org .springframework .data .elasticsearch .annotations .FieldType .* ;
18
+ import static org .springframework .data .elasticsearch .annotations .FieldType .Text ;
19
19
20
20
import org .assertj .core .api .Assertions ;
21
21
import org .junit .jupiter .api .Test ;
26
26
import org .springframework .data .annotation .Id ;
27
27
import org .springframework .data .elasticsearch .annotations .Document ;
28
28
import org .springframework .data .elasticsearch .annotations .Field ;
29
+ import org .springframework .data .elasticsearch .core .ReactiveElasticsearchOperations ;
29
30
import org .springframework .data .elasticsearch .junit .jupiter .ReactiveElasticsearchRestTemplateConfiguration ;
30
31
import org .springframework .data .elasticsearch .junit .jupiter .SpringIntegrationTest ;
31
32
import org .springframework .data .elasticsearch .repository .ReactiveElasticsearchRepository ;
36
37
* @author Christoph Strobl
37
38
* @author Peter-Josef Meisch
38
39
*/
40
+ @ SuppressWarnings ("SpringJavaInjectionPointsAutowiringInspection" )
39
41
@ SpringIntegrationTest
40
42
@ ContextConfiguration (classes = { ReactiveElasticsearchRepositoriesRegistrarTests .Config .class })
41
43
public class ReactiveElasticsearchRepositoriesRegistrarTests {
@@ -45,6 +47,7 @@ public class ReactiveElasticsearchRepositoriesRegistrarTests {
45
47
@ EnableReactiveElasticsearchRepositories (considerNestedRepositories = true )
46
48
static class Config {}
47
49
50
+ @ Autowired ReactiveElasticsearchOperations operations ;
48
51
@ Autowired ReactiveSampleEntityRepository repository ;
49
52
@ Autowired ApplicationContext context ;
50
53
@@ -54,6 +57,9 @@ public void testConfiguration() {
54
57
Assertions .assertThat (context ).isNotNull ();
55
58
Assertions .assertThat (repository ).isNotNull ();
56
59
60
+ // there is an index to delete after this test
61
+ operations .indexOps (ReactiveElasticsearchRepositoryConfigurationExtensionUnitTests .SwCharacter .class ).delete ()
62
+ .block ();
57
63
}
58
64
59
65
interface ReactiveSampleEntityRepository extends ReactiveElasticsearchRepository <SampleEntity , String > {}
0 commit comments