diff --git a/muted-tests.yml b/muted-tests.yml index 7cb1b19316e89..0aa7d2253a936 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -489,36 +489,6 @@ tests: - class: org.elasticsearch.packaging.test.DockerTests method: test085EnvironmentVariablesAreRespectedUnderDockerExec issue: https://github.com/elastic/elasticsearch/issues/128115 -- class: org.elasticsearch.xpack.esql.expression.function.scalar.string.RLikeTests - method: testEvaluateInManyThreads {TestCase=100 random code points matches self case insensitive with text} - issue: https://github.com/elastic/elasticsearch/issues/128705 -- class: org.elasticsearch.xpack.esql.expression.function.scalar.string.RLikeTests - method: testEvaluateInManyThreads {TestCase=100 random code points matches self case insensitive with keyword} - issue: https://github.com/elastic/elasticsearch/issues/128706 -- class: org.elasticsearch.xpack.esql.expression.function.scalar.string.RLikeTests - method: testCrankyEvaluateBlockWithNulls {TestCase=100 random code points matches self case insensitive with text} - issue: https://github.com/elastic/elasticsearch/issues/128710 -- class: org.elasticsearch.xpack.esql.expression.function.scalar.string.RLikeTests - method: testCrankyEvaluateBlockWithNulls {TestCase=100 random code points matches self case insensitive with keyword} - issue: https://github.com/elastic/elasticsearch/issues/128711 -- class: org.elasticsearch.xpack.esql.expression.function.scalar.string.WildcardLikeTests - method: testCrankyEvaluateBlockWithNulls {TestCase=100 random code points matches self case insensitive with text} - issue: https://github.com/elastic/elasticsearch/issues/128712 -- class: org.elasticsearch.xpack.esql.expression.function.scalar.string.WildcardLikeTests - method: testCrankyEvaluateBlockWithNulls {TestCase=100 random code points matches self case insensitive with keyword} - issue: https://github.com/elastic/elasticsearch/issues/128713 -- class: org.elasticsearch.xpack.esql.expression.function.scalar.string.WildcardLikeTests - method: testEvaluateBlockWithNulls {TestCase=100 random code points matches self case insensitive with text} - issue: https://github.com/elastic/elasticsearch/issues/128714 -- class: org.elasticsearch.xpack.esql.expression.function.scalar.string.WildcardLikeTests - method: testEvaluateBlockWithNulls {TestCase=100 random code points matches self case insensitive with keyword} - issue: https://github.com/elastic/elasticsearch/issues/128715 -- class: org.elasticsearch.xpack.esql.expression.function.scalar.string.RLikeTests - method: testEvaluateBlockWithNulls {TestCase=100 random code points matches self case insensitive with keyword} - issue: https://github.com/elastic/elasticsearch/issues/128716 -- class: org.elasticsearch.xpack.esql.expression.function.scalar.string.RLikeTests - method: testEvaluateBlockWithNulls {TestCase=100 random code points matches self case insensitive with text} - issue: https://github.com/elastic/elasticsearch/issues/128717 - class: org.elasticsearch.compute.operator.LimitOperatorTests method: testEarlyTermination issue: https://github.com/elastic/elasticsearch/issues/128721 diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/RLikeTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/RLikeTests.java index d42b9c9b48cc4..b6c74710b1588 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/RLikeTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/RLikeTests.java @@ -94,8 +94,15 @@ private static void casesForString( return new TextAndPattern(text, escapeString.apply(text)); }, true); cases(cases, title + " matches self case insensitive", () -> { - String text = textSupplier.get(); - return new TextAndPattern(randomCasing(text), escapeString.apply(text)); + // RegExp doesn't support case-insensitive matching for Unicodes whose length changes when the case changes. + // Example: a case-insensitive ES regexp query for the pattern `weiß` won't match the value `WEISS` (but will match `WEIß`). + // Or `ʼn` (U+0149) vs. `ʼN` (U+02BC U+004E). + String text, caseChanged; + for (text = textSupplier.get(), caseChanged = randomCasing(text); text.length() != caseChanged.length();) { + text = textSupplier.get(); + caseChanged = randomCasing(text); + } + return new TextAndPattern(caseChanged, escapeString.apply(text)); }, true, true); cases(cases, title + " doesn't match self with trailing", () -> { String text = textSupplier.get();