mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-22 12:02:10 +00:00
Clean up : Updated Tests which was causing build failure
This commit is contained in:
parent
7f1d26dac3
commit
54c897be0b
@ -19,7 +19,9 @@ import org.apache.commons.lang.math.RandomUtils;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.elasticsearch.DoubleIDEntity;
|
||||
import org.springframework.data.elasticsearch.core.ElasticsearchTemplate;
|
||||
import org.springframework.data.elasticsearch.repositories.DoubleIDRepository;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
@ -41,9 +43,15 @@ public class DoubleIDRepositoryTests {
|
||||
@Resource
|
||||
private DoubleIDRepository repository;
|
||||
|
||||
@Autowired
|
||||
private ElasticsearchTemplate elasticsearchTemplate;
|
||||
|
||||
|
||||
@Before
|
||||
public void before() {
|
||||
repository.deleteAll();
|
||||
elasticsearchTemplate.deleteIndex(DoubleIDEntity.class);
|
||||
elasticsearchTemplate.createIndex(DoubleIDEntity.class);
|
||||
elasticsearchTemplate.refresh(DoubleIDEntity.class, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -19,7 +19,10 @@ import org.apache.commons.lang.math.RandomUtils;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.elasticsearch.DoubleIDEntity;
|
||||
import org.springframework.data.elasticsearch.IntegerIDEntity;
|
||||
import org.springframework.data.elasticsearch.core.ElasticsearchTemplate;
|
||||
import org.springframework.data.elasticsearch.repositories.IntegerIDRepository;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
@ -41,10 +44,16 @@ public class IntegerIDRepositoryTests {
|
||||
@Resource
|
||||
private IntegerIDRepository repository;
|
||||
|
||||
@Before
|
||||
public void before() {
|
||||
repository.deleteAll();
|
||||
}
|
||||
@Autowired
|
||||
private ElasticsearchTemplate elasticsearchTemplate;
|
||||
|
||||
|
||||
@Before
|
||||
public void before() {
|
||||
elasticsearchTemplate.deleteIndex(IntegerIDEntity.class);
|
||||
elasticsearchTemplate.createIndex(IntegerIDEntity.class);
|
||||
elasticsearchTemplate.refresh(IntegerIDEntity.class, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldDoBulkIndexDocument() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user