#509 - Polishing.
Move off deprecated API. Clean up unused gitignore files.
This commit is contained in:
13
elasticsearch/example/.gitignore
vendored
13
elasticsearch/example/.gitignore
vendored
@@ -1,13 +0,0 @@
|
||||
.project
|
||||
.classpath
|
||||
.springBeans
|
||||
.settings/
|
||||
target/
|
||||
|
||||
#IntelliJ Stuff
|
||||
.idea
|
||||
*.iml
|
||||
|
||||
##ignore local node data files for unit tests
|
||||
/data
|
||||
/.DS_Store
|
||||
13
elasticsearch/reactive/.gitignore
vendored
13
elasticsearch/reactive/.gitignore
vendored
@@ -1,13 +0,0 @@
|
||||
.project
|
||||
.classpath
|
||||
.springBeans
|
||||
.settings/
|
||||
target/
|
||||
|
||||
#IntelliJ Stuff
|
||||
.idea
|
||||
*.iml
|
||||
|
||||
##ignore local node data files for unit tests
|
||||
/data
|
||||
/.DS_Store
|
||||
@@ -26,12 +26,13 @@ import java.text.SimpleDateFormat;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.data.elasticsearch.core.ReactiveElasticsearchOperations;
|
||||
import org.springframework.data.elasticsearch.core.SearchHit;
|
||||
import org.springframework.data.elasticsearch.core.query.Criteria;
|
||||
import org.springframework.data.elasticsearch.core.query.CriteriaQuery;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
/**
|
||||
@@ -57,7 +58,7 @@ public class ReactiveElasticsearchOperationsTest {
|
||||
CriteriaQuery query = new CriteriaQuery(
|
||||
new Criteria("keywords").contains(expectedWord).and("date").greaterThanEqual(expectedDate));
|
||||
|
||||
operations.find(query, Conference.class) //
|
||||
operations.search(query, Conference.class) //
|
||||
.as(StepVerifier::create) //
|
||||
.consumeNextWith(it -> verify(it, expectedWord, expectedDate)) //
|
||||
.consumeNextWith(it -> verify(it, expectedWord, expectedDate)) //
|
||||
@@ -65,11 +66,11 @@ public class ReactiveElasticsearchOperationsTest {
|
||||
.verifyComplete();
|
||||
}
|
||||
|
||||
void verify(Conference it, String expectedWord, String expectedDate) {
|
||||
void verify(SearchHit<Conference> hit, String expectedWord, String expectedDate) {
|
||||
|
||||
assertThat(it.getKeywords()).contains(expectedWord);
|
||||
assertThat(hit.getContent().getKeywords()).contains(expectedWord);
|
||||
try {
|
||||
assertThat(format.parse(it.getDate())).isAfter(format.parse(expectedDate));
|
||||
assertThat(format.parse(hit.getContent().getDate())).isAfter(format.parse(expectedDate));
|
||||
} catch (ParseException e) {
|
||||
fail("o_O", e);
|
||||
}
|
||||
|
||||
13
elasticsearch/rest/.gitignore
vendored
13
elasticsearch/rest/.gitignore
vendored
@@ -1,13 +0,0 @@
|
||||
.project
|
||||
.classpath
|
||||
.springBeans
|
||||
.settings/
|
||||
target/
|
||||
|
||||
#IntelliJ Stuff
|
||||
.idea
|
||||
*.iml
|
||||
|
||||
##ignore local node data files for unit tests
|
||||
/data
|
||||
/.DS_Store
|
||||
Reference in New Issue
Block a user