Skip to content

Commit 21840ca

Browse files
authored
Fix LogsdbTestSuiteIT 9.1 release test failures (#130633)
and ensure this yaml test suite isn't run if build is not snapshot. Closes #130506 Closes #130507
1 parent d9c537f commit 21840ca

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

test/test-clusters/src/main/java/org/elasticsearch/test/cluster/FeatureFlag.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public enum FeatureFlag {
2222
USE_LUCENE101_POSTINGS_FORMAT("es.use_lucene101_postings_format_feature_flag_enabled=true", Version.fromString("9.1.0"), null),
2323
IVF_FORMAT("es.ivf_format_feature_flag_enabled=true", Version.fromString("9.1.0"), null),
2424
LOGS_STREAM("es.logs_stream_feature_flag_enabled=true", Version.fromString("9.1.0"), null),
25-
PATTERNED_TEXT("es.patterned_text_feature_flag_enabled=true", Version.fromString("9.2.0"), null);
25+
PATTERNED_TEXT("es.patterned_text_feature_flag_enabled=true", Version.fromString("9.1.0"), null);
2626

2727
public final String systemProperty;
2828
public final Version from;

x-pack/plugin/logsdb/src/yamlRestTest/java/org/elasticsearch/xpack/logsdb/LogsdbTestSuiteIT.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import com.carrotsearch.randomizedtesting.annotations.Name;
1111
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
1212

13+
import org.elasticsearch.Build;
1314
import org.elasticsearch.common.settings.SecureString;
1415
import org.elasticsearch.common.settings.Settings;
1516
import org.elasticsearch.common.util.concurrent.ThreadContext;
@@ -20,6 +21,9 @@
2021
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
2122
import org.junit.ClassRule;
2223

24+
import java.util.ArrayList;
25+
import java.util.List;
26+
2327
public class LogsdbTestSuiteIT extends ESClientYamlSuiteTestCase {
2428

2529
private static final String USER = "test_admin";
@@ -43,7 +47,19 @@ public LogsdbTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {
4347

4448
@ParametersFactory
4549
public static Iterable<Object[]> parameters() throws Exception {
46-
return ESClientYamlSuiteTestCase.createParameters();
50+
// Filter out 52_esql_insist_operator_synthetic_source.yml suite for snapshot builds:
51+
// (esql doesn't use feature flags and all experimental features are just enabled if build is snapshot)
52+
53+
List<Object[]> filtered = new ArrayList<>();
54+
for (Object[] params : ESClientYamlSuiteTestCase.createParameters()) {
55+
ClientYamlTestCandidate candidate = (ClientYamlTestCandidate) params[0];
56+
if (candidate.getRestTestSuite().getName().equals("52_esql_insist_operator_synthetic_source")
57+
&& Build.current().isSnapshot() == false) {
58+
continue;
59+
}
60+
filtered.add(new Object[] { candidate });
61+
}
62+
return filtered;
4763
}
4864

4965
@Override

0 commit comments

Comments
 (0)