diff options
Diffstat (limited to 'core/src/test/java/org/elasticsearch/percolator/PercolateDocumentParserTests.java')
-rw-r--r-- | core/src/test/java/org/elasticsearch/percolator/PercolateDocumentParserTests.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/src/test/java/org/elasticsearch/percolator/PercolateDocumentParserTests.java b/core/src/test/java/org/elasticsearch/percolator/PercolateDocumentParserTests.java index eecc71f388..ab0e86fd2a 100644 --- a/core/src/test/java/org/elasticsearch/percolator/PercolateDocumentParserTests.java +++ b/core/src/test/java/org/elasticsearch/percolator/PercolateDocumentParserTests.java @@ -92,7 +92,7 @@ public class PercolateDocumentParserTests extends ESTestCase { parser = new PercolateDocumentParser(highlightPhase, new SortParseElement(), aggregationPhase); request = Mockito.mock(PercolateShardRequest.class); - Mockito.when(request.shardId()).thenReturn(new ShardId(new Index("_index"), 0)); + Mockito.when(request.shardId()).thenReturn(new ShardId("_index", "_na_", 0)); Mockito.when(request.documentType()).thenReturn("type"); } @@ -104,7 +104,7 @@ public class PercolateDocumentParserTests extends ESTestCase { .endObject(); Mockito.when(request.source()).thenReturn(source.bytes()); - PercolateContext context = new PercolateContext(request, new SearchShardTarget("_node", "_index", 0), mapperService); + PercolateContext context = new PercolateContext(request, new SearchShardTarget("_node", new Index("_index", "_na_"), 0), mapperService); ParsedDocument parsedDocument = parser.parse(request, context, mapperService, queryShardContext); assertThat(parsedDocument.rootDoc().get("field1"), equalTo("value1")); } @@ -123,7 +123,7 @@ public class PercolateDocumentParserTests extends ESTestCase { .endObject(); Mockito.when(request.source()).thenReturn(source.bytes()); - PercolateContext context = new PercolateContext(request, new SearchShardTarget("_node", "_index", 0), mapperService); + PercolateContext context = new PercolateContext(request, new SearchShardTarget("_node", new Index("_index", "_na_"), 0), mapperService); ParsedDocument parsedDocument = parser.parse(request, context, mapperService, queryShardContext); assertThat(parsedDocument.rootDoc().get("field1"), equalTo("value1")); assertThat(context.percolateQuery(), equalTo(new TermQuery(new Term("field1", "value1")))); @@ -147,7 +147,7 @@ public class PercolateDocumentParserTests extends ESTestCase { Mockito.when(request.source()).thenReturn(source.bytes()); Mockito.when(request.docSource()).thenReturn(docSource.bytes()); - PercolateContext context = new PercolateContext(request, new SearchShardTarget("_node", "_index", 0), mapperService); + PercolateContext context = new PercolateContext(request, new SearchShardTarget("_node", new Index("_index", "_na_"), 0), mapperService); ParsedDocument parsedDocument = parser.parse(request, context, mapperService, queryShardContext); assertThat(parsedDocument.rootDoc().get("field1"), equalTo("value1")); assertThat(context.percolateQuery(), equalTo(new TermQuery(new Term("field1", "value1")))); @@ -174,7 +174,7 @@ public class PercolateDocumentParserTests extends ESTestCase { Mockito.when(request.source()).thenReturn(source.bytes()); Mockito.when(request.docSource()).thenReturn(docSource.bytes()); - PercolateContext context = new PercolateContext(request, new SearchShardTarget("_node", "_index", 0), mapperService); + PercolateContext context = new PercolateContext(request, new SearchShardTarget("_node", new Index("_index", "_na_"), 0), mapperService); try { parser.parse(request, context, mapperService, queryShardContext); } catch (IllegalArgumentException e) { |