|
10 | 10 | import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; |
11 | 11 |
|
12 | 12 | import org.apache.http.util.EntityUtils; |
13 | | -import org.elasticsearch.Build; |
14 | 13 | import org.elasticsearch.Version; |
15 | 14 | import org.elasticsearch.client.Request; |
16 | 15 | import org.elasticsearch.client.Response; |
|
34 | 33 | import org.elasticsearch.xpack.esql.action.EsqlCapabilities; |
35 | 34 | import org.elasticsearch.xpack.esql.plugin.QueryPragmas; |
36 | 35 | import org.hamcrest.Matcher; |
37 | | -import org.junit.Before; |
38 | 36 |
|
39 | 37 | import java.io.IOException; |
40 | 38 | import java.math.BigDecimal; |
@@ -80,17 +78,6 @@ public static List<Object[]> args() throws Exception { |
80 | 78 |
|
81 | 79 | protected FieldExtractorTestCase(MappedFieldType.FieldExtractPreference preference) { |
82 | 80 | this.preference = preference; |
83 | | - if (preference != null) { |
84 | | - assumeTrue("Requires pragma", Build.current().isSnapshot()); |
85 | | - } |
86 | | - } |
87 | | - |
88 | | - @Before |
89 | | - public void notOld() { |
90 | | - assumeTrue( |
91 | | - "support changed pretty radically in 8.12 so we don't test against 8.11", |
92 | | - getCachedNodesVersions().stream().allMatch(v -> Version.fromString(v).onOrAfter(Version.V_8_12_0)) |
93 | | - ); |
94 | 81 | } |
95 | 82 |
|
96 | 83 | public void testTextField() throws IOException { |
@@ -1766,6 +1753,7 @@ private Map<String, Object> runEsql(String query) throws IOException { |
1766 | 1753 | request = request.pragmas( |
1767 | 1754 | Settings.builder().put(QueryPragmas.FIELD_EXTRACT_PREFERENCE.getKey(), preference.toString()).build() |
1768 | 1755 | ); |
| 1756 | + request.pragmasOk(); |
1769 | 1757 | } |
1770 | 1758 | return runEsqlSync(request); |
1771 | 1759 | } |
|
0 commit comments