Skip to content

Commit ae450be

Browse files
Only run patterned_text mapper test if feature flag enabled (#130214) (#130480)
(cherry picked from commit f88aaa3) # Conflicts: # muted-tests.yml
1 parent f76fcb0 commit ae450be

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

x-pack/plugin/logsdb/src/test/java/org/elasticsearch/xpack/logsdb/patternedtext/PatternedTextFieldMapperTests.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import org.elasticsearch.xcontent.XContentFactory;
4141
import org.elasticsearch.xpack.logsdb.LogsDBPlugin;
4242
import org.junit.AssumptionViolatedException;
43+
import org.junit.Before;
4344

4445
import java.io.IOException;
4546
import java.util.Collection;
@@ -72,6 +73,11 @@ protected void assertExistsQuery(MappedFieldType fieldType, Query query, LuceneD
7273
assertNoFieldNamesField(fields);
7374
}
7475

76+
@Before
77+
public void setup() {
78+
assumeTrue("Only when patterned_text feature flag is enabled", PatternedTextFieldMapper.PATTERNED_TEXT_MAPPER.isEnabled());
79+
}
80+
7581
public void testExistsStandardSource() throws IOException {
7682
assertExistsQuery(createMapperService(fieldMapping(b -> b.field("type", "patterned_text"))));
7783
}

0 commit comments

Comments
 (0)