Skip to content

Commit d1cd92c

Browse files
committed
Add check for knn availability
1 parent 49addf3 commit d1cd92c

File tree

1 file changed

+3
-0
lines changed
  • x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/plugin

1 file changed

+3
-0
lines changed

x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/plugin/KnnFunctionIT.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import org.elasticsearch.xcontent.XContentFactory;
1515
import org.elasticsearch.xpack.esql.EsqlTestUtils;
1616
import org.elasticsearch.xpack.esql.action.AbstractEsqlIntegTestCase;
17+
import org.elasticsearch.xpack.esql.action.EsqlCapabilities;
1718
import org.junit.Before;
1819

1920
import java.io.IOException;
@@ -110,6 +111,8 @@ public void testKnnNonPushedDown() {
110111

111112
@Before
112113
public void setup() throws IOException {
114+
assumeTrue("Needs KNN support", EsqlCapabilities.Cap.KNN_FUNCTION.isEnabled());
115+
113116
var indexName = "test";
114117
var client = client().admin().indices();
115118
XContentBuilder mapping = XContentFactory.jsonBuilder()

0 commit comments

Comments
 (0)