Skip to content

Commit

Permalink
Skip verifying version constants on pre-5.0.0
Browse files Browse the repository at this point in the history
This commit causes the verification of the Lucene version constants to
be skipped on pre-5.0.0 versions. This is because we do not have the
infrastructure in place to easily start pre-5.0.0 nodes. This is okay
anyway because version constants for pre-5.0.0 are not in a state of
being changed.
  • Loading branch information
jasontedor committed Jun 10, 2017
1 parent 56979ee commit 58bc897
Showing 1 changed file with 34 additions and 33 deletions.
67 changes: 34 additions & 33 deletions qa/verify-version-constants/build.gradle
Expand Up @@ -29,36 +29,37 @@ task bwcTest {
group = 'verification'
}

// this test causes issues when it tries to run a 2.0.0
// disabled due to https://github.com/elastic/elasticsearch/issues/25170
//for (Version version : indexCompatVersions) {
//
// String baseName = "v${version}"
// Task oldClusterTest = tasks.create(name: "${baseName}#oldClusterTest", type: RestIntegTestTask) {
// mustRunAfter(precommit)
// }
// configure(extensions.findByName("${baseName}#oldClusterTestCluster")) {
// distribution = 'zip'
// bwcVersion = version
// numBwcNodes = 1
// numNodes = 1
// clusterName = 'verify-version-constants'
// if (version.onOrAfter('5.3.0')) {
// setting 'http.content_type.required', 'true'
// }
// }
//
// Task versionBwcTest = tasks.create(name: "${baseName}#bwcTest") {
// dependsOn = [oldClusterTest]
// }
//
// bwcTest.dependsOn(versionBwcTest)
//}
//
//test.enabled = false
//
//task integTest {
// dependsOn = ["v${indexCompatVersions[-1]}#bwcTest"]
//}
//
//check.dependsOn(integTest)
for (Version version : indexCompatVersions) {

// we do not have infrastructure for starting pre-5.0.0 nodes so we skip them
if (version.before("5.0.0")) continue

String baseName = "v${version}"
Task oldClusterTest = tasks.create(name: "${baseName}#oldClusterTest", type: RestIntegTestTask) {
mustRunAfter(precommit)
}
configure(extensions.findByName("${baseName}#oldClusterTestCluster")) {
distribution = 'zip'
bwcVersion = version
numBwcNodes = 1
numNodes = 1
clusterName = 'verify-version-constants'
if (version.onOrAfter('5.3.0')) {
setting 'http.content_type.required', 'true'
}
}

Task versionBwcTest = tasks.create(name: "${baseName}#bwcTest") {
dependsOn = [oldClusterTest]
}

bwcTest.dependsOn(versionBwcTest)
}

test.enabled = false

task integTest {
dependsOn = ["v${indexCompatVersions[-1]}#bwcTest"]
}

check.dependsOn(integTest)

0 comments on commit 58bc897

Please sign in to comment.