File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 7676import static org .elasticsearch .xpack .esql .EsqlTestUtils .classpathResources ;
7777import static org .elasticsearch .xpack .esql .action .EsqlCapabilities .Cap .METRICS_COMMAND ;
7878import static org .elasticsearch .xpack .esql .action .EsqlCapabilities .Cap .RERANK ;
79+ import static org .elasticsearch .xpack .esql .action .EsqlCapabilities .Cap .SEMANTIC_TEXT_FIELD_CAPS ;
7980import static org .elasticsearch .xpack .esql .action .EsqlCapabilities .Cap .SOURCE_FIELD_MAPPING ;
8081
8182// This test can run very long in serverless configurations
@@ -179,7 +180,7 @@ public final void test() throws Throwable {
179180 }
180181
181182 protected void shouldSkipTest (String testName ) throws IOException {
182- if (Stream . of ( "semantic_text_field_caps" , RERANK . capabilityName ()). anyMatch ( testCase . requiredCapabilities :: contains )) {
183+ if (requiresInferenceEndpoint ( )) {
183184 assumeTrue ("Inference test service needs to be supported" , supportsInferenceTestService ());
184185 }
185186 checkCapabilities (adminClient (), testFeatureService , testName , testCase );
@@ -250,6 +251,11 @@ protected boolean supportsInferenceTestService() {
250251 return true ;
251252 }
252253
254+ protected boolean requiresInferenceEndpoint () {
255+ return Stream .of (SEMANTIC_TEXT_FIELD_CAPS .capabilityName (), RERANK .capabilityName ())
256+ .anyMatch (testCase .requiredCapabilities ::contains );
257+ }
258+
253259 protected boolean supportsIndexModeLookup () throws IOException {
254260 return true ;
255261 }
You can’t perform that action at this time.
0 commit comments