Browse Source

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
Nik Everett 1 năm trước cách đây
mục cha
commit
548917aa34

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

@@ -36,7 +36,7 @@ public class EsqlCapabilities {
          * Support for reversing whole grapheme clusters. This is not supported
          * on JDK versions less than 20.
          */
-        FN_REVERSE_GRAPHEME_CLUSTERS(Runtime.version().feature() < 20),
+        FN_REVERSE_GRAPHEME_CLUSTERS(Runtime.version().feature() >= 20),
 
         /**
          * Support for function {@code CBRT}. Done in #108574.

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

@@ -259,6 +259,10 @@ public class CsvTests extends ESTestCase {
                     testCase.requiredCapabilities,
                     everyItem(in(EsqlCapabilities.capabilities(true)))
                 );
+                assumeTrue(
+                    "Capability not enabled in this build",
+                    EsqlCapabilities.capabilities(false).containsAll(testCase.requiredCapabilities)
+                );
             } else {
                 for (EsqlCapabilities.Cap c : EsqlCapabilities.Cap.values()) {
                     if (false == c.isEnabled()) {