From d07d27ec1df0a7dc1967280ae70709997719271f Mon Sep 17 00:00:00 2001 From: weizijun Date: Fri, 14 Jan 2022 00:40:10 +0800 Subject: [PATCH] add test (#81634) add a xcontent filter test that will failed, when random to `filterOnParser`. The test will fixed when jackson upgrade in https://github.com/elastic/elasticsearch/pull/80160 --- .../xcontent/support/AbstractFilteringTestCase.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/framework/src/main/java/org/elasticsearch/common/xcontent/support/AbstractFilteringTestCase.java b/test/framework/src/main/java/org/elasticsearch/common/xcontent/support/AbstractFilteringTestCase.java index c5bb14133042e..5d01eb6031134 100644 --- a/test/framework/src/main/java/org/elasticsearch/common/xcontent/support/AbstractFilteringTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/common/xcontent/support/AbstractFilteringTestCase.java @@ -456,4 +456,17 @@ public void testManyFilters() throws IOException, URISyntaxException { testFilter(deep, deep, manyFilters, emptySet()); } } + + @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/pull/80160") + public void testExcludeWildCardFields() throws IOException { + Builder sample = builder -> builder.startObject() + .startObject("include") + .field("field1", "v1") + .field("field2", "v2") + .endObject() + .field("include2", "vv2") + .endObject(); + Builder expected = builder -> builder.startObject().startObject("include").field("field1", "v1").endObject().endObject(); + testFilter(expected, sample, singleton("include"), singleton("*.field2")); + } }