From 78ba1c4d340cad8ac183435ca8eb6e6c9871380d Mon Sep 17 00:00:00 2001 From: Daniel Mitterdorfer Date: Mon, 4 Jun 2018 14:03:01 +0200 Subject: [PATCH] Mute MatchPhrase*QueryBuilderTests Relates #31061 --- .../index/query/MatchPhrasePrefixQueryBuilderTests.java | 9 +++++++++ .../index/query/MatchPhraseQueryBuilderTests.java | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/server/src/test/java/org/elasticsearch/index/query/MatchPhrasePrefixQueryBuilderTests.java b/server/src/test/java/org/elasticsearch/index/query/MatchPhrasePrefixQueryBuilderTests.java index b4d5f98fe0b47..00701adc449c3 100644 --- a/server/src/test/java/org/elasticsearch/index/query/MatchPhrasePrefixQueryBuilderTests.java +++ b/server/src/test/java/org/elasticsearch/index/query/MatchPhrasePrefixQueryBuilderTests.java @@ -99,6 +99,15 @@ protected void doAssertLuceneQuery(MatchPhrasePrefixQueryBuilder queryBuilder, Q .or(instanceOf(IndexOrDocValuesQuery.class)).or(instanceOf(MatchNoDocsQuery.class))); } + /** + * Overridden to allow for annotating with @AwaitsFix. Please remove this method after fixing. + */ + @Override + @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/31061") + public void testToQuery() throws IOException { + super.testToQuery(); + } + public void testIllegalValues() { IllegalArgumentException e = expectThrows(IllegalArgumentException.class, () -> new MatchPhrasePrefixQueryBuilder(null, "value")); assertEquals("[match_phrase_prefix] requires fieldName", e.getMessage()); diff --git a/server/src/test/java/org/elasticsearch/index/query/MatchPhraseQueryBuilderTests.java b/server/src/test/java/org/elasticsearch/index/query/MatchPhraseQueryBuilderTests.java index 1ac53992ebe8c..91a775dbf0256 100644 --- a/server/src/test/java/org/elasticsearch/index/query/MatchPhraseQueryBuilderTests.java +++ b/server/src/test/java/org/elasticsearch/index/query/MatchPhraseQueryBuilderTests.java @@ -107,6 +107,15 @@ protected void doAssertLuceneQuery(MatchPhraseQueryBuilder queryBuilder, Query q .or(instanceOf(IndexOrDocValuesQuery.class)).or(instanceOf(MatchNoDocsQuery.class))); } + /** + * Overridden to allow for annotating with @AwaitsFix. Please remove this method after fixing. + */ + @Override + @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/31061") + public void testToQuery() throws IOException { + super.testToQuery(); + } + public void testIllegalValues() { IllegalArgumentException e = expectThrows(IllegalArgumentException.class, () -> new MatchPhraseQueryBuilder(null, "value")); assertEquals("[match_phrase] requires fieldName", e.getMessage());