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
This commit is contained in:
Alpar Torok 2019-03-07 09:07:11 +02:00 committed by GitHub
parent f5da028a3d
commit 34ea84948c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -194,7 +194,7 @@ class ClusterFormationTasks {
}
Version version = Version.fromString(elasticsearchVersion)
String os = getOs()
String classifier = "${os}-x86_64"
String classifier = "-${os}-x86_64"
String packaging = os.equals('windows') ? 'zip' : 'tar.gz'
String artifactName = 'elasticsearch'
if (distro.equals('oss') && Version.fromString(elasticsearchVersion).onOrAfter('6.3.0')) {
@ -204,6 +204,7 @@ class ClusterFormationTasks {
String snapshotProject = "${os}-${os.equals('windows') ? 'zip' : 'tar'}"
if (version.before("7.0.0")) {
snapshotProject = "zip"
packaging = "zip"
}
if (distro.equals("oss")) {
snapshotProject = "oss-" + snapshotProject
@ -224,7 +225,7 @@ class ClusterFormationTasks {
classifier = "" // for bwc, before we had classifiers
}
// group does not matter as it is not used when we pull from the ivy repo that points to the download service
dependency = "dnm:${artifactName}:${elasticsearchVersion}-${classifier}@${packaging}"
dependency = "dnm:${artifactName}:${elasticsearchVersion}${classifier}@${packaging}"
}
project.dependencies.add(configuration.name, dependency)
}

View File

@ -294,7 +294,10 @@ public abstract class ESRestTestCase extends ESTestCase {
@After
public final void cleanUpCluster() throws Exception {
if (preserveClusterUponCompletion() == false) {
ensureNoInitializingShards();
if (nodeVersions.stream().noneMatch(version -> version.before(Version.V_6_2_0))) {
// wait_for_no_initializing_shards added in 6.2
ensureNoInitializingShards();
}
wipeCluster();
waitForClusterStateUpdatesToFinish();
logIfThereAreRunningTasks();