Skip to content

Commit 539d8d4

Browse files
ES|QL: Add multi-node generative tests (#129765)
1 parent c1046b0 commit 539d8d4

File tree

1 file changed

+42
-0
lines changed
  • x-pack/plugin/esql/qa/server/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/esql/qa/multi_node

1 file changed

+42
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License
4+
* 2.0; you may not use this file except in compliance with the Elastic License
5+
* 2.0.
6+
*/
7+
8+
package org.elasticsearch.xpack.esql.qa.multi_node;
9+
10+
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
11+
12+
import org.elasticsearch.test.TestClustersThreadFilter;
13+
import org.elasticsearch.test.cluster.ElasticsearchCluster;
14+
import org.elasticsearch.xpack.esql.qa.rest.generative.GenerativeRestTest;
15+
import org.junit.ClassRule;
16+
17+
/**
18+
* This test generates random queries, runs them against the CSV test dataset and checks that they don't throw unexpected exceptions.
19+
*
20+
* If muted, please:
21+
* <ul>
22+
* <li>see the error message reported in the failure and the corresponding query (it's in the logs right before the error)</li>
23+
* <li>update the corresponding issue with the query (if there is no issue for that failure yet, create one)</li>
24+
* <li>add a pattern that matches the error message to {@link GenerativeRestTest#ALLOWED_ERRORS}; also link the issue</li>
25+
* <li>unmute (and possibly check that the test doesn't fail anymore)</li>
26+
* </ul>
27+
*/
28+
@ThreadLeakFilters(filters = TestClustersThreadFilter.class)
29+
public class GenerativeIT extends GenerativeRestTest {
30+
@ClassRule
31+
public static ElasticsearchCluster cluster = Clusters.testCluster(spec -> spec.plugin("inference-service-test"));
32+
33+
@Override
34+
protected String getTestRestCluster() {
35+
return cluster.getHttpAddresses();
36+
}
37+
38+
@Override
39+
protected boolean supportsSourceFieldMapping() {
40+
return false;
41+
}
42+
}

0 commit comments

Comments
 (0)