Skip to content

Commit 10aec78

Browse files
authored
Ensure that feature flag is enabled in new KeywordFieldMapperTests (#121248)
`DOC_VALUES_SPARSE_INDEX` is needed for tests to work.
1 parent 74e8ae5 commit 10aec78

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

muted-tests.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -319,12 +319,6 @@ tests:
319319
- class: org.elasticsearch.xpack.security.CoreWithSecurityClientYamlTestSuiteIT
320320
method: test {yaml=cat.aliases/10_basic/Simple alias}
321321
issue: https://github.com/elastic/elasticsearch/issues/121186
322-
- class: org.elasticsearch.index.mapper.KeywordFieldMapperTests
323-
method: testFieldTypeWithSkipDocValues_LogsDbMode
324-
issue: https://github.com/elastic/elasticsearch/issues/121232
325-
- class: org.elasticsearch.index.mapper.KeywordFieldMapperTests
326-
method: testFieldTypeDefault_ConfiguredDocValues
327-
issue: https://github.com/elastic/elasticsearch/issues/121233
328322
- class: org.elasticsearch.xpack.ml.integration.ClassificationIT
329323
method: testWithDatastreams
330324
issue: https://github.com/elastic/elasticsearch/issues/121236

server/src/test/java/org/elasticsearch/index/mapper/KeywordFieldMapperTests.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,8 @@ public void testDocValuesLoadedFromStoredSynthetic() throws IOException {
773773
}
774774

775775
public void testFieldTypeWithSkipDocValues_LogsDbMode() throws IOException {
776+
assumeTrue("Needs feature flag to be enabled", FieldMapper.DOC_VALUES_SPARSE_INDEX.isEnabled());
777+
776778
final MapperService mapperService = createMapperService(
777779
Settings.builder()
778780
.put(IndexSettings.MODE.getKey(), IndexMode.LOGSDB.name())
@@ -792,6 +794,8 @@ public void testFieldTypeWithSkipDocValues_LogsDbMode() throws IOException {
792794
}
793795

794796
public void testFieldTypeDefault_StandardMode() throws IOException {
797+
assumeTrue("Needs feature flag to be enabled", FieldMapper.DOC_VALUES_SPARSE_INDEX.isEnabled());
798+
795799
final MapperService mapperService = createMapperService(
796800
Settings.builder()
797801
.put(IndexSettings.MODE.getKey(), IndexMode.STANDARD.name())
@@ -811,6 +815,8 @@ public void testFieldTypeDefault_StandardMode() throws IOException {
811815
}
812816

813817
public void testFieldTypeDefault_NonMatchingFieldName() throws IOException {
818+
assumeTrue("Needs feature flag to be enabled", FieldMapper.DOC_VALUES_SPARSE_INDEX.isEnabled());
819+
814820
final MapperService mapperService = createMapperService(
815821
Settings.builder()
816822
.put(IndexSettings.MODE.getKey(), IndexMode.LOGSDB.name())
@@ -830,6 +836,8 @@ public void testFieldTypeDefault_NonMatchingFieldName() throws IOException {
830836
}
831837

832838
public void testFieldTypeDefault_ConfiguredIndexed() throws IOException {
839+
assumeTrue("Needs feature flag to be enabled", FieldMapper.DOC_VALUES_SPARSE_INDEX.isEnabled());
840+
833841
final MapperService mapperService = createMapperService(
834842
Settings.builder()
835843
.put(IndexSettings.MODE.getKey(), IndexMode.LOGSDB.name())
@@ -850,6 +858,8 @@ public void testFieldTypeDefault_ConfiguredIndexed() throws IOException {
850858
}
851859

852860
public void testFieldTypeDefault_ConfiguredDocValues() throws IOException {
861+
assumeTrue("Needs feature flag to be enabled", FieldMapper.DOC_VALUES_SPARSE_INDEX.isEnabled());
862+
853863
final MapperService mapperService = createMapperService(
854864
Settings.builder()
855865
.put(IndexSettings.MODE.getKey(), IndexMode.LOGSDB.name())
@@ -870,6 +880,8 @@ public void testFieldTypeDefault_ConfiguredDocValues() throws IOException {
870880
}
871881

872882
public void testFieldTypeDefault_LogsDbMode_NonSortField() throws IOException {
883+
assumeTrue("Needs feature flag to be enabled", FieldMapper.DOC_VALUES_SPARSE_INDEX.isEnabled());
884+
873885
final MapperService mapperService = createMapperService(
874886
Settings.builder().put(IndexSettings.MODE.getKey(), IndexMode.LOGSDB.name()).build(),
875887
mapping(b -> {
@@ -886,6 +898,8 @@ public void testFieldTypeDefault_LogsDbMode_NonSortField() throws IOException {
886898
}
887899

888900
public void testFieldTypeWithSkipDocValues_IndexedFalseDocValuesTrue() throws IOException {
901+
assumeTrue("Needs feature flag to be enabled", FieldMapper.DOC_VALUES_SPARSE_INDEX.isEnabled());
902+
889903
final MapperService mapperService = createMapperService(
890904
Settings.builder()
891905
.put(IndexSettings.MODE.getKey(), IndexMode.LOGSDB.name())
@@ -907,6 +921,8 @@ public void testFieldTypeWithSkipDocValues_IndexedFalseDocValuesTrue() throws IO
907921
}
908922

909923
public void testFieldTypeDefault_IndexedFalseDocValuesFalse() throws IOException {
924+
assumeTrue("Needs feature flag to be enabled", FieldMapper.DOC_VALUES_SPARSE_INDEX.isEnabled());
925+
910926
final MapperService mapperService = createMapperService(
911927
Settings.builder()
912928
.put(IndexSettings.MODE.getKey(), IndexMode.LOGSDB.name())

0 commit comments

Comments
 (0)