diff --git a/muted-tests.yml b/muted-tests.yml index 8d4d87afb0fc2..d60fe4528c0ed 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -537,8 +537,6 @@ tests: - class: org.elasticsearch.compute.aggregation.TopIntAggregatorFunctionTests method: testManyInitialManyPartialFinalRunnerThrowing issue: https://github.com/elastic/elasticsearch/issues/130145 -- class: org.elasticsearch.xpack.logsdb.patternedtext.PatternedTextFieldMapperTests - issue: https://github.com/elastic/elasticsearch/issues/130162 - class: org.elasticsearch.index.engine.ThreadPoolMergeExecutorServiceDiskSpaceTests method: testUnavailableBudgetBlocksNewMergeTasksFromStartingExecution issue: https://github.com/elastic/elasticsearch/issues/130205 diff --git a/x-pack/plugin/logsdb/src/test/java/org/elasticsearch/xpack/logsdb/patternedtext/PatternedTextFieldMapperTests.java b/x-pack/plugin/logsdb/src/test/java/org/elasticsearch/xpack/logsdb/patternedtext/PatternedTextFieldMapperTests.java index 2a707eafa285d..9b572e171bd96 100644 --- a/x-pack/plugin/logsdb/src/test/java/org/elasticsearch/xpack/logsdb/patternedtext/PatternedTextFieldMapperTests.java +++ b/x-pack/plugin/logsdb/src/test/java/org/elasticsearch/xpack/logsdb/patternedtext/PatternedTextFieldMapperTests.java @@ -40,6 +40,7 @@ import org.elasticsearch.xcontent.XContentFactory; import org.elasticsearch.xpack.logsdb.LogsDBPlugin; import org.junit.AssumptionViolatedException; +import org.junit.Before; import java.io.IOException; import java.util.Collection; @@ -72,6 +73,11 @@ protected void assertExistsQuery(MappedFieldType fieldType, Query query, LuceneD assertNoFieldNamesField(fields); } + @Before + public void setup() { + assumeTrue("Only when patterned_text feature flag is enabled", PatternedTextFieldMapper.PATTERNED_TEXT_MAPPER.isEnabled()); + } + public void testExistsStandardSource() throws IOException { assertExistsQuery(createMapperService(fieldMapping(b -> b.field("type", "patterned_text")))); }