Skip to content

Commit 1ed2be5

Browse files
authored
Fix release tests by checking QSTR function is registered (#113527) (#113575)
1 parent 774a97f commit 1ed2be5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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)