Skip to content

Commit a5600e0

Browse files
committed
Fix bwc tests failure to extract (#39619)
* Set correct packaging for older versions Continue using zip packages for pre 7 Some other bwc fixes that hid behind this one. Closes #39441 #39751
1 parent bf3df3e commit a5600e0

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class ClusterFormationTasks {
194194
}
195195
Version version = Version.fromString(elasticsearchVersion)
196196
String os = getOs()
197-
String classifier = "${os}-x86_64"
197+
String classifier = "-${os}-x86_64"
198198
String packaging = os.equals('windows') ? 'zip' : 'tar.gz'
199199
String artifactName = 'elasticsearch'
200200
if (distro.equals('oss') && Version.fromString(elasticsearchVersion).onOrAfter('6.3.0')) {
@@ -204,6 +204,7 @@ class ClusterFormationTasks {
204204
String snapshotProject = "${os}-${os.equals('windows') ? 'zip' : 'tar'}"
205205
if (version.before("7.0.0")) {
206206
snapshotProject = "zip"
207+
packaging = "zip"
207208
}
208209
if (distro.equals("oss")) {
209210
snapshotProject = "oss-" + snapshotProject
@@ -224,7 +225,7 @@ class ClusterFormationTasks {
224225
classifier = "" // for bwc, before we had classifiers
225226
}
226227
// group does not matter as it is not used when we pull from the ivy repo that points to the download service
227-
dependency = "dnm:${artifactName}:${elasticsearchVersion}-${classifier}@${packaging}"
228+
dependency = "dnm:${artifactName}:${elasticsearchVersion}${classifier}@${packaging}"
228229
}
229230
project.dependencies.add(configuration.name, dependency)
230231
}

test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,10 @@ protected HttpHost buildHttpHost(String host, int port) {
294294
@After
295295
public final void cleanUpCluster() throws Exception {
296296
if (preserveClusterUponCompletion() == false) {
297-
ensureNoInitializingShards();
297+
if (nodeVersions.stream().noneMatch(version -> version.before(Version.V_6_2_0))) {
298+
// wait_for_no_initializing_shards added in 6.2
299+
ensureNoInitializingShards();
300+
}
298301
wipeCluster();
299302
waitForClusterStateUpdatesToFinish();
300303
logIfThereAreRunningTasks();

0 commit comments

Comments
 (0)