summaryrefslogtreecommitdiff
path: root/core/src/test/java/org/elasticsearch/search
diff options
context:
space:
mode:
authormarkharwood <markharwood@gmail.com>2017-06-15 16:29:25 +0100
committerGitHub <noreply@github.com>2017-06-15 16:29:25 +0100
commit7a3155368c14b41554fec3e5464064dec4842d06 (patch)
tree1f64cefa36a0189a87a4375b74b95fc898df4362 /core/src/test/java/org/elasticsearch/search
parent5e64cd08bc01f02fab223f6df1f31292c92157ab (diff)
Test fix - removed superfluous assertion (#25247)
Closes #25245
Diffstat (limited to 'core/src/test/java/org/elasticsearch/search')
-rw-r--r--core/src/test/java/org/elasticsearch/search/aggregations/bucket/significant/SignificantTextAggregatorTests.java6
1 files changed, 0 insertions, 6 deletions
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/significant/SignificantTextAggregatorTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/significant/SignificantTextAggregatorTests.java
index 8376d8c57a..1057d3a71e 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/significant/SignificantTextAggregatorTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/significant/SignificantTextAggregatorTests.java
@@ -65,10 +65,6 @@ public class SignificantTextAggregatorTests extends AggregatorTestCase {
textFieldType.setIndexAnalyzer(new NamedAnalyzer("my_analyzer", AnalyzerScope.GLOBAL, new StandardAnalyzer()));
IndexWriterConfig indexWriterConfig = newIndexWriterConfig();
- indexWriterConfig.setMaxBufferedDocs(100);
- indexWriterConfig.setRAMBufferSizeMB(100); // flush on open to have a
- // single segment with
- // predictable docIds
try (Directory dir = newDirectory(); IndexWriter w = new IndexWriter(dir, indexWriterConfig)) {
for (int i = 0; i < 10; i++) {
Document doc = new Document();
@@ -95,7 +91,6 @@ public class SignificantTextAggregatorTests extends AggregatorTestCase {
.subAggregation(sigAgg);
try (IndexReader reader = DirectoryReader.open(w)) {
- assertEquals("test expects a single segment", 1, reader.leaves().size());
IndexSearcher searcher = new IndexSearcher(reader);
// Search "odd" which should have no duplication
@@ -145,7 +140,6 @@ public class SignificantTextAggregatorTests extends AggregatorTestCase {
SignificantTextAggregationBuilder sigAgg = new SignificantTextAggregationBuilder("sig_text", "text");
sigAgg.sourceFieldNames(Arrays.asList(new String [] {"title", "text"}));
try (IndexReader reader = DirectoryReader.open(w)) {
- assertEquals("test expects a single segment", 1, reader.leaves().size());
IndexSearcher searcher = new IndexSearcher(reader);
searchAndReduce(searcher, new TermQuery(new Term("text", "foo")), sigAgg, textFieldType);
// No significant results to be found in this test - only checking we don't end up