浏览代码

Enable tsdb feature flag in server tests (#79366)

We now have tests in the server that rely on tsdb settings. Usually we
build a snapshot version of Elasticsearch and the feature flag is
enabled by default. But nightly we run the tests outside of snapshot
mode which disables the feature flag. So the tests fail! This manually
reenables the feature flag when we a running in non-snapshot mode.

Closes #79339
Nik Everett 4 年之前
父节点
当前提交
d4f698d16a
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      server/build.gradle

+ 8 - 0
server/build.gradle

@@ -6,6 +6,8 @@
  * Side Public License, v 1.
  */
 
+import org.elasticsearch.gradle.internal.info.BuildParams
+
 apply plugin: 'elasticsearch.build'
 apply plugin: 'nebula.optional-base'
 apply plugin: 'elasticsearch.publish'
@@ -127,6 +129,12 @@ tasks.named("processResources").configure {
     dependsOn generateModulesList, generatePluginsList
 }
 
+if (BuildParams.isSnapshotBuild() == false) {
+    tasks.named("test").configure {
+        systemProperty 'es.index_mode_feature_flag_registered', 'true'
+    }
+}
+
 tasks.named("thirdPartyAudit").configure {
     ignoreMissingClasses(
             // from com.fasterxml.jackson.dataformat.yaml.YAMLMapper (jackson-dataformat-yaml)