Skip to content

Commit 708180e

Browse files
dnhatnafoucret
authored andcommitted
Skip rerank tests in mixed clusters (#126415)
If the clusters don't support inference test services, skip tests that require inference services. Hence, we should check for rerank tests. Relates #123074
1 parent ac63795 commit 708180e

File tree

12 files changed

+2473
-2309
lines changed

12 files changed

+2473
-2309
lines changed

x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/EsqlSpecTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public final void test() throws Throwable {
184184
}
185185

186186
protected void shouldSkipTest(String testName) throws IOException {
187-
if (testCase.requiredCapabilities.contains("semantic_text_field_caps")) {
187+
if (testCase.requiredCapabilities.contains("semantic_text_field_caps") || testCase.requiredCapabilities.contains("rerank")) {
188188
assumeTrue("Inference test service needs to be supported for semantic_text", supportsInferenceTestService());
189189
}
190190
checkCapabilities(adminClient(), testFeatureService, testName, testCase);

x-pack/plugin/esql/src/main/antlr/EsqlBaseLexer.g4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ CHANGE_POINT : 'change_point' -> pushMode(CHANGE_POINT_MODE);
8686
// Once the command has been stabilized, remove the DEV_ prefix and the {}? conditional and move the command to the
8787
// main section while preserving alphabetical order:
8888
// MYCOMMAND : 'mycommand' -> ...
89+
DEV_COMPLETION : {this.isDevVersion()}? 'completion' -> pushMode(EXPRESSION_MODE);
8990
DEV_INLINESTATS : {this.isDevVersion()}? 'inlinestats' -> pushMode(EXPRESSION_MODE);
9091
DEV_LOOKUP : {this.isDevVersion()}? 'lookup_🐔' -> pushMode(LOOKUP_MODE);
9192
DEV_METRICS : {this.isDevVersion()}? 'metrics' -> pushMode(METRICS_MODE);

x-pack/plugin/esql/src/main/antlr/EsqlBaseLexer.tokens

Lines changed: 168 additions & 167 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)