Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix release tests for SemanticMatchTestCase #119022

Merged
merged 6 commits into from
Dec 19, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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