Browse Source

Unmute Categorize VerifierTests and require snapshot on them (#117016) (#117331)

Fixes https://github.com/elastic/elasticsearch/issues/116856
Fixes https://github.com/elastic/elasticsearch/issues/116857
Fixes https://github.com/elastic/elasticsearch/issues/116858
Iván Cea Fontenla 11 months ago
parent
commit
efaf72d866

+ 0 - 9
muted-tests.yml

@@ -359,15 +359,6 @@ tests:
 - class: org.elasticsearch.oldrepos.OldRepositoryAccessIT
   method: testOldRepoAccess
   issue: https://github.com/elastic/elasticsearch/issues/115631
-- class: org.elasticsearch.xpack.esql.analysis.VerifierTests
-  method: testCategorizeNestedGrouping
-  issue: https://github.com/elastic/elasticsearch/issues/116858
-- class: org.elasticsearch.xpack.esql.analysis.VerifierTests
-  method: testCategorizeSingleGrouping
-  issue: https://github.com/elastic/elasticsearch/issues/116857
-- class: org.elasticsearch.xpack.esql.analysis.VerifierTests
-  method: testCategorizeWithinAggregations
-  issue: https://github.com/elastic/elasticsearch/issues/116856
 
 # Examples:
 #

+ 6 - 3
x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/VerifierTests.java

@@ -1732,7 +1732,8 @@ public class VerifierTests extends ESTestCase {
     }
 
     public void testCategorizeSingleGrouping() {
-        assumeTrue("requires snapshot builds", Build.current().isSnapshot());
+        assumeTrue("requires Categorize capability", EsqlCapabilities.Cap.CATEGORIZE.isEnabled());
+
         query("from test | STATS COUNT(*) BY CATEGORIZE(first_name)");
         query("from test | STATS COUNT(*) BY cat = CATEGORIZE(first_name)");
 
@@ -1760,7 +1761,8 @@ public class VerifierTests extends ESTestCase {
     }
 
     public void testCategorizeNestedGrouping() {
-        assumeTrue("requires snapshot builds", Build.current().isSnapshot());
+        assumeTrue("requires Categorize capability", EsqlCapabilities.Cap.CATEGORIZE.isEnabled());
+
         query("from test | STATS COUNT(*) BY CATEGORIZE(LENGTH(first_name)::string)");
 
         assertEquals(
@@ -1774,7 +1776,8 @@ public class VerifierTests extends ESTestCase {
     }
 
     public void testCategorizeWithinAggregations() {
-        assumeTrue("requires snapshot builds", Build.current().isSnapshot());
+        assumeTrue("requires Categorize capability", EsqlCapabilities.Cap.CATEGORIZE.isEnabled());
+
         query("from test | STATS MV_COUNT(cat), COUNT(*) BY cat = CATEGORIZE(first_name)");
 
         assertEquals(