Skip to content

Commit

Permalink
ESQL: Don't test field extraction in 8.11
Browse files Browse the repository at this point in the history
We changed field extraction in ES|QL in 8.12 quite a bit so our tests
would have to be super complex to test a cluster of mixed versions
between 8.11 and `main`. So let's just skip it.

Closes elastic#105837
  • Loading branch information
nik9000 committed Mar 4, 2024
1 parent 6c11826 commit 45efeaa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@

import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;

import org.apache.lucene.tests.util.LuceneTestCase;
import org.elasticsearch.test.TestClustersThreadFilter;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.xpack.esql.qa.rest.FieldExtractorTestCase;
import org.junit.ClassRule;

@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/105837")
@ThreadLeakFilters(filters = TestClustersThreadFilter.class)
public class FieldExtractorIT extends FieldExtractorTestCase {
@ClassRule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.elasticsearch.xcontent.XContentType;
import org.elasticsearch.xcontent.json.JsonXContent;
import org.hamcrest.Matcher;
import org.junit.Before;

import java.io.IOException;
import java.math.BigDecimal;
Expand Down Expand Up @@ -57,6 +58,14 @@
public abstract class FieldExtractorTestCase extends ESRestTestCase {
private static final Logger logger = LogManager.getLogger(FieldExtractorTestCase.class);

@Before
public void notOld() {
assumeTrue(
"support changed pretty radically in 8.12 so we don't test against 8.11",
getCachedNodesVersions().stream().allMatch(v -> Version.fromString(v).onOrAfter(Version.V_8_12_0))
);
}

public void testTextField() throws IOException {
textTest().test(randomAlphaOfLength(20));
}
Expand Down

0 comments on commit 45efeaa

Please sign in to comment.