Skip to content

Commit ce9f3f4

Browse files
authored
Skip tests with semantic_text in ES|QL (#122222)
With this change, we will skip tests using semantic_texts in ES|QL while awaiting a fix for the mismatch in the _source of the semantic text fields. The key change is that we need to avoid indexing semantic_text fields in clusters with more than one node. Relates #121411
1 parent bda99c9 commit ce9f3f4

File tree

6 files changed

+32
-5
lines changed

6 files changed

+32
-5
lines changed

muted-tests.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,6 @@ tests:
353353
- class: org.elasticsearch.search.CrossClusterSearchUnavailableClusterIT
354354
method: testSearchSkipUnavailable
355355
issue: https://github.com/elastic/elasticsearch/issues/121497
356-
- class: org.elasticsearch.xpack.esql.qa.multi_node.EsqlSpecIT
357-
issue: https://github.com/elastic/elasticsearch/issues/121411
358356
- class: org.elasticsearch.smoketest.DocsClientYamlTestSuiteIT
359357
method: test {yaml=reference/cat/health/cat-health-no-timestamp-example}
360358
issue: https://github.com/elastic/elasticsearch/issues/121867
@@ -383,8 +381,6 @@ tests:
383381
- class: org.elasticsearch.xpack.ml.integration.ClassificationIT
384382
method: testWithOnlyTrainingRowsAndTrainingPercentIsFifty_DependentVariableIsBoolean
385383
issue: https://github.com/elastic/elasticsearch/issues/121680
386-
- class: org.elasticsearch.xpack.esql.qa.single_node.EsqlSpecIT
387-
issue: https://github.com/elastic/elasticsearch/issues/121411
388384
- class: org.elasticsearch.xpack.downsample.DownsampleActionSingleNodeTests
389385
method: testDuplicateDownsampleRequest
390386
issue: https://github.com/elastic/elasticsearch/issues/122158

x-pack/plugin/esql/qa/server/mixed-cluster/src/javaRestTest/java/org/elasticsearch/xpack/esql/qa/mixed/MixedClusterEsqlSpecIT.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ protected void shouldSkipTest(String testName) throws IOException {
7070
assumeTrue("Test " + testName + " is skipped on " + bwcVersion, isEnabled(testName, instructions, bwcVersion));
7171
}
7272

73+
@Override
74+
protected boolean shouldSkipTestsWithSemanticTextFields() {
75+
return true;
76+
}
77+
7378
@Override
7479
protected boolean enableRoundingDoubleValuesOnAsserting() {
7580
return true;

x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/MultiClusterSpecIT.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ protected void shouldSkipTest(String testName) throws IOException {
127127
assumeFalse("LOOKUP JOIN not yet supported in CCS", testCase.requiredCapabilities.contains(JOIN_LOOKUP_V12.capabilityName()));
128128
}
129129

130+
@Override
131+
protected boolean shouldSkipTestsWithSemanticTextFields() {
132+
return true;
133+
}
134+
130135
private TestFeatureService remoteFeaturesService() throws IOException {
131136
if (remoteFeaturesService == null) {
132137
var remoteNodeVersions = readVersionsFromNodesInfo(remoteClusterClient());

x-pack/plugin/esql/qa/server/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/esql/qa/multi_node/EsqlSpecIT.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,9 @@ public EsqlSpecIT(
3737
protected boolean enableRoundingDoubleValuesOnAsserting() {
3838
return true;
3939
}
40+
41+
@Override
42+
protected boolean shouldSkipTestsWithSemanticTextFields() {
43+
return true;
44+
}
4045
}

x-pack/plugin/esql/qa/server/single-node/src/javaRestTest/java/org/elasticsearch/xpack/esql/qa/single_node/EsqlSpecIT.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,9 @@ protected boolean enableRoundingDoubleValuesOnAsserting() {
4242
// This suite runs with more than one node and three shards in serverless
4343
return cluster.getNumNodes() > 1;
4444
}
45+
46+
@Override
47+
protected boolean shouldSkipTestsWithSemanticTextFields() {
48+
return cluster.getNumNodes() > 1;
49+
}
4550
}

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
import static org.elasticsearch.xpack.esql.CsvTestsDataLoader.deleteInferenceEndpoint;
7171
import static org.elasticsearch.xpack.esql.CsvTestsDataLoader.loadDataSetIntoEs;
7272
import static org.elasticsearch.xpack.esql.EsqlTestUtils.classpathResources;
73+
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.SEMANTIC_TEXT_TYPE;
7374

7475
// This test can run very long in serverless configurations
7576
@TimeoutSuite(millis = 30 * TimeUnits.MINUTE)
@@ -128,15 +129,22 @@ protected EsqlSpecTestCase(
128129

129130
@Before
130131
public void setup() throws IOException {
132+
if (shouldSkipTestsWithSemanticTextFields()) {
133+
assumeFalse("semantic_text tests are muted", testCase.requiredCapabilities.contains(SEMANTIC_TEXT_TYPE.capabilityName()));
134+
}
131135
if (supportsInferenceTestService() && clusterHasInferenceEndpoint(client()) == false) {
132136
createInferenceEndpoint(client());
133137
}
134-
135138
if (indexExists(availableDatasetsForEs(client(), supportsIndexModeLookup()).iterator().next().indexName()) == false) {
136139
loadDataSetIntoEs(client(), supportsIndexModeLookup());
137140
}
138141
}
139142

143+
// https://github.com/elastic/elasticsearch/issues/121411
144+
protected boolean shouldSkipTestsWithSemanticTextFields() {
145+
return false;
146+
}
147+
140148
@AfterClass
141149
public static void wipeTestData() throws IOException {
142150
try {
@@ -172,6 +180,9 @@ protected void shouldSkipTest(String testName) throws IOException {
172180
}
173181
checkCapabilities(adminClient(), testFeatureService, testName, testCase);
174182
assumeTrue("Test " + testName + " is not enabled", isEnabled(testName, instructions, Version.CURRENT));
183+
if (shouldSkipTestsWithSemanticTextFields()) {
184+
assumeFalse("semantic_text tests are muted", testCase.requiredCapabilities.contains(SEMANTIC_TEXT_TYPE.capabilityName()));
185+
}
175186
}
176187

177188
protected static void checkCapabilities(RestClient client, TestFeatureService testFeatureService, String testName, CsvTestCase testCase)

0 commit comments

Comments
 (0)