Skip to content

Commit

Permalink
Fix release tests for SemanticMatchTestCase (#119022) (#119107)
Browse files Browse the repository at this point in the history
  • Loading branch information
ioanatia authored Dec 19, 2024
1 parent b7dc70d commit 8393a62
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

public abstract class SemanticMatchTestCase extends ESRestTestCase {
public void testWithMultipleInferenceIds() throws IOException {
assumeTrue("semantic text capability not available", EsqlCapabilities.Cap.SEMANTIC_TEXT_TYPE.isEnabled());

String query = """
from test-semantic1,test-semantic2
| where match(semantic_text_field, "something")
Expand All @@ -34,6 +36,8 @@ public void testWithMultipleInferenceIds() throws IOException {
}

public void testWithInferenceNotConfigured() {
assumeTrue("semantic text capability not available", EsqlCapabilities.Cap.SEMANTIC_TEXT_TYPE.isEnabled());

String query = """
from test-semantic3
| where match(semantic_text_field, "something")
Expand All @@ -46,8 +50,6 @@ public void testWithInferenceNotConfigured() {

@Before
public void setUpIndices() throws IOException {
assumeTrue("semantic text capability not available", EsqlCapabilities.Cap.SEMANTIC_TEXT_TYPE.isEnabled());

var settings = Settings.builder().build();

String mapping1 = """
Expand Down Expand Up @@ -83,7 +85,6 @@ public void setUpIndices() throws IOException {

@Before
public void setUpTextEmbeddingInferenceEndpoint() throws IOException {
assumeTrue("semantic text capability not available", EsqlCapabilities.Cap.SEMANTIC_TEXT_TYPE.isEnabled());
Request request = new Request("PUT", "_inference/text_embedding/test_dense_inference");
request.setJsonEntity("""
{
Expand All @@ -101,7 +102,6 @@ public void setUpTextEmbeddingInferenceEndpoint() throws IOException {

@After
public void wipeData() throws IOException {
assumeTrue("semantic text capability not available", EsqlCapabilities.Cap.SEMANTIC_TEXT_TYPE.isEnabled());
adminClient().performRequest(new Request("DELETE", "*"));

try {
Expand Down

0 comments on commit 8393a62

Please sign in to comment.