Skip to content

Commit 7d4936d

Browse files
committed
Code style.
1 parent 554ec4f commit 7d4936d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
import static org.elasticsearch.xpack.esql.EsqlTestUtils.classpathResources;
7777
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.METRICS_COMMAND;
7878
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.RERANK;
79+
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.SEMANTIC_TEXT_FIELD_CAPS;
7980
import 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
}

0 commit comments

Comments
 (0)