2222
2323public abstract class SemanticMatchTestCase extends ESRestTestCase {
2424 public void testWithMultipleInferenceIds () throws IOException {
25+ assumeTrue ("semantic text capability not available" , EsqlCapabilities .Cap .SEMANTIC_TEXT_TYPE .isEnabled ());
26+
2527 String query = """
2628 from test-semantic1,test-semantic2
2729 | where match(semantic_text_field, "something")
@@ -34,6 +36,8 @@ public void testWithMultipleInferenceIds() throws IOException {
3436 }
3537
3638 public void testWithInferenceNotConfigured () {
39+ assumeTrue ("semantic text capability not available" , EsqlCapabilities .Cap .SEMANTIC_TEXT_TYPE .isEnabled ());
40+
3741 String query = """
3842 from test-semantic3
3943 | where match(semantic_text_field, "something")
@@ -46,8 +50,6 @@ public void testWithInferenceNotConfigured() {
4650
4751 @ Before
4852 public void setUpIndices () throws IOException {
49- assumeTrue ("semantic text capability not available" , EsqlCapabilities .Cap .SEMANTIC_TEXT_TYPE .isEnabled ());
50-
5153 var settings = Settings .builder ().build ();
5254
5355 String mapping1 = """
@@ -83,7 +85,6 @@ public void setUpIndices() throws IOException {
8385
8486 @ Before
8587 public void setUpTextEmbeddingInferenceEndpoint () throws IOException {
86- assumeTrue ("semantic text capability not available" , EsqlCapabilities .Cap .SEMANTIC_TEXT_TYPE .isEnabled ());
8788 Request request = new Request ("PUT" , "_inference/text_embedding/test_dense_inference" );
8889 request .setJsonEntity ("""
8990 {
@@ -101,7 +102,6 @@ public void setUpTextEmbeddingInferenceEndpoint() throws IOException {
101102
102103 @ After
103104 public void wipeData () throws IOException {
104- assumeTrue ("semantic text capability not available" , EsqlCapabilities .Cap .SEMANTIC_TEXT_TYPE .isEnabled ());
105105 adminClient ().performRequest (new Request ("DELETE" , "*" ));
106106
107107 try {
0 commit comments