Skip to content

Commit d19a9cc

Browse files
authored
Fix release tests by checking QSTR function is registered (#113527)
1 parent 5e06092 commit d19a9cc

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

muted-tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,6 @@ tests:
290290
- class: org.elasticsearch.validation.DotPrefixClientYamlTestSuiteIT
291291
method: test {p0=dot_prefix/10_basic/Deprecated index template with a dot prefix index pattern}
292292
issue: https://github.com/elastic/elasticsearch/issues/113529
293-
- class: org.elasticsearch.xpack.esql.expression.function.fulltext.QueryStringFunctionTests
294-
issue: https://github.com/elastic/elasticsearch/issues/113496
295293
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
296294
method: test {p0=search/180_locale_dependent_mapping/Test Index and Search locale dependent mappings / dates}
297295
issue: https://github.com/elastic/elasticsearch/issues/113537

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/fulltext/QueryStringFunctionTests.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,24 @@
1818
import org.elasticsearch.xpack.esql.expression.function.FunctionName;
1919
import org.elasticsearch.xpack.esql.expression.function.TestCaseSupplier;
2020
import org.hamcrest.Matcher;
21+
import org.junit.BeforeClass;
2122

2223
import java.util.Arrays;
2324
import java.util.LinkedList;
2425
import java.util.List;
2526
import java.util.function.Supplier;
2627

28+
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.QSTR_FUNCTION;
2729
import static org.hamcrest.Matchers.equalTo;
2830

2931
@FunctionName("qstr")
3032
public class QueryStringFunctionTests extends AbstractFunctionTestCase {
3133

34+
@BeforeClass
35+
public static void checkFunctionEnabled() {
36+
assumeTrue("QSTR capability should be enabled ", QSTR_FUNCTION.isEnabled());
37+
}
38+
3239
public QueryStringFunctionTests(@Name("TestCase") Supplier<TestCaseSupplier.TestCase> testCaseSupplier) {
3340
this.testCase = testCaseSupplier.get();
3441
}

0 commit comments

Comments
 (0)