Browse Source

Fix release tests not finding distribution (#40096)

When running the release tests we should not apply `-SNAPSHOT` to the ES
version number as we are producing one that does not have it,
so we only add `SNAPSHOT` if the `project.version` also has it.

Closes  #39753
Alpar Torok 6 năm trước cách đây
mục cha
commit
9c88ae6ef4

+ 2 - 1
buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy

@@ -115,7 +115,8 @@ class ClusterFormationTasks {
             String elasticsearchVersion
             if (i < config.numBwcNodes) {
                 elasticsearchVersion = config.bwcVersion.toString()
-                if (project.bwcVersions.unreleased.contains(config.bwcVersion)) {
+                if (project.bwcVersions.unreleased.contains(config.bwcVersion) && 
+                    (project.version != elasticsearchVersion)) {
                     elasticsearchVersion += "-SNAPSHOT"
                 }
                 distro = bwcDistro