Skip to content

Commit 548917a

Browse files
authored
ESQL: Fix test muting (#115448) (#115465)
* ESQL: Fix test muting (#115448) Fix the test muting on the test for grapheme clusters - it should only allow the test if we're on the 20+ jvm. Closes #114536 * Change old explanation
1 parent 29c5966 commit 548917a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public enum Cap {
3636
* Support for reversing whole grapheme clusters. This is not supported
3737
* on JDK versions less than 20.
3838
*/
39-
FN_REVERSE_GRAPHEME_CLUSTERS(Runtime.version().feature() < 20),
39+
FN_REVERSE_GRAPHEME_CLUSTERS(Runtime.version().feature() >= 20),
4040

4141
/**
4242
* Support for function {@code CBRT}. Done in #108574.

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/CsvTests.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,10 @@ public final void test() throws Throwable {
259259
testCase.requiredCapabilities,
260260
everyItem(in(EsqlCapabilities.capabilities(true)))
261261
);
262+
assumeTrue(
263+
"Capability not enabled in this build",
264+
EsqlCapabilities.capabilities(false).containsAll(testCase.requiredCapabilities)
265+
);
262266
} else {
263267
for (EsqlCapabilities.Cap c : EsqlCapabilities.Cap.values()) {
264268
if (false == c.isEnabled()) {

0 commit comments

Comments
 (0)