浏览代码

Set time series feature flag for tests in aggregation module (#91507)

Set time series feature flag for release builds to test and internalClusterTest tasks. So that the time series aggregation test doesn't fail, because the plugin wouldn't load the time_series aggregation.

Closes #91505
Martijn van Groningen 2 年之前
父节点
当前提交
bec3bce8b6
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      modules/aggregations/build.gradle

+ 10 - 0
modules/aggregations/build.gradle

@@ -1,4 +1,5 @@
 import org.elasticsearch.gradle.Version
+import org.elasticsearch.gradle.internal.info.BuildParams
 
 /*
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -27,6 +28,15 @@ restResources {
   }
 }
 
+if (BuildParams.isSnapshotBuild() == false) {
+  tasks.named("test").configure {
+    systemProperty 'es.index_mode_feature_flag_registered', 'true'
+  }
+  tasks.named("internalClusterTest").configure {
+    systemProperty 'es.index_mode_feature_flag_registered', 'true'
+  }
+}
+
 tasks.named("yamlRestTestV7CompatTransform").configure { task ->
   task.skipTest("search.aggregation/20_terms/string profiler via global ordinals filters implementation", "The profiler results aren't backwards compatible.")
   task.skipTest("search.aggregation/20_terms/string profiler via global ordinals native implementation", "The profiler results aren't backwards compatible.")