mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 01:22:26 -04:00
Limit full cluster restart upgrade tests to wire compatible versions (#82445)
This commit is contained in:
parent
bbc685c5ba
commit
e6ba67f973
18 changed files with 23 additions and 23 deletions
|
@ -236,11 +236,11 @@ public class BwcVersions {
|
|||
);
|
||||
}
|
||||
|
||||
public void withIndexCompatiple(BiConsumer<Version, String> versionAction) {
|
||||
public void withIndexCompatible(BiConsumer<Version, String> versionAction) {
|
||||
getIndexCompatible().forEach(v -> versionAction.accept(v, "v" + v.toString()));
|
||||
}
|
||||
|
||||
public void withIndexCompatiple(Predicate<Version> filter, BiConsumer<Version, String> versionAction) {
|
||||
public void withIndexCompatible(Predicate<Version> filter, BiConsumer<Version, String> versionAction) {
|
||||
getIndexCompatible().stream().filter(filter).forEach(v -> versionAction.accept(v, "v" + v.toString()));
|
||||
}
|
||||
|
||||
|
@ -250,11 +250,11 @@ public class BwcVersions {
|
|||
);
|
||||
}
|
||||
|
||||
public void withWireCompatiple(BiConsumer<Version, String> versionAction) {
|
||||
public void withWireCompatible(BiConsumer<Version, String> versionAction) {
|
||||
getWireCompatible().forEach(v -> versionAction.accept(v, "v" + v.toString()));
|
||||
}
|
||||
|
||||
public void withWireCompatiple(Predicate<Version> filter, BiConsumer<Version, String> versionAction) {
|
||||
public void withWireCompatible(Predicate<Version> filter, BiConsumer<Version, String> versionAction) {
|
||||
getWireCompatible().stream().filter(filter).forEach(v -> versionAction.accept(v, "v" + v.toString()));
|
||||
}
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ public class DistroTestPlugin implements Plugin<Project> {
|
|||
lifecycleTasks.get(distribution.getType()).configure(t -> t.dependsOn(destructiveTask));
|
||||
|
||||
if ((distribution.getType() == DEB || distribution.getType() == RPM) && distribution.getBundledJdk()) {
|
||||
for (Version version : BuildParams.getBwcVersions().getIndexCompatible()) {
|
||||
for (Version version : BuildParams.getBwcVersions().getWireCompatible()) {
|
||||
final ElasticsearchDistribution bwcDistro;
|
||||
if (version.equals(Version.fromString(distribution.getVersion()))) {
|
||||
// this is the same as the distribution we are testing
|
||||
|
@ -248,7 +248,7 @@ public class DistroTestPlugin implements Plugin<Project> {
|
|||
private static Map<String, TaskProvider<?>> versionTasks(Project project, String taskPrefix) {
|
||||
Map<String, TaskProvider<?>> versionTasks = new HashMap<>();
|
||||
|
||||
for (Version version : BuildParams.getBwcVersions().getIndexCompatible()) {
|
||||
for (Version version : BuildParams.getBwcVersions().getWireCompatible()) {
|
||||
versionTasks.put(version.toString(), project.getTasks().register(taskPrefix + ".v" + version));
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ dependencies {
|
|||
testImplementation project(':client:rest-high-level')
|
||||
}
|
||||
|
||||
BuildParams.bwcVersions.withWireCompatiple { bwcVersion, baseName ->
|
||||
BuildParams.bwcVersions.withWireCompatible { bwcVersion, baseName ->
|
||||
|
||||
/**
|
||||
* We execute tests 3 times.
|
||||
|
|
|
@ -15,7 +15,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
|
|||
apply plugin: 'elasticsearch.internal-test-artifact'
|
||||
apply plugin: 'elasticsearch.bwc-test'
|
||||
|
||||
BuildParams.bwcVersions.withIndexCompatiple { bwcVersion, baseName ->
|
||||
BuildParams.bwcVersions.withWireCompatible { bwcVersion, baseName ->
|
||||
def baseCluster = testClusters.register(baseName) {
|
||||
versions = [bwcVersion.toString(), project.version]
|
||||
numberOfNodes = 2
|
||||
|
|
|
@ -21,7 +21,7 @@ restResources {
|
|||
}
|
||||
}
|
||||
|
||||
BuildParams.bwcVersions.withWireCompatiple { bwcVersion, baseName ->
|
||||
BuildParams.bwcVersions.withWireCompatible { bwcVersion, baseName ->
|
||||
|
||||
if (bwcVersion != VersionProperties.getElasticsearchVersion()) {
|
||||
/* This project runs the core REST tests against a 4 node cluster where two of
|
||||
|
|
|
@ -19,7 +19,7 @@ dependencies {
|
|||
testImplementation project(':client:rest-high-level')
|
||||
}
|
||||
|
||||
BuildParams.bwcVersions.withIndexCompatiple { bwcVersion, baseName ->
|
||||
BuildParams.bwcVersions.withIndexCompatible { bwcVersion, baseName ->
|
||||
String oldClusterName = "${baseName}-old"
|
||||
String newClusterName = "${baseName}-new"
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
|
|||
apply plugin: 'elasticsearch.bwc-test'
|
||||
apply plugin: 'elasticsearch.rest-resources'
|
||||
|
||||
BuildParams.bwcVersions.withWireCompatiple { bwcVersion, baseName ->
|
||||
BuildParams.bwcVersions.withWireCompatible { bwcVersion, baseName ->
|
||||
/*
|
||||
* The goal here is to:
|
||||
* <ul>
|
||||
|
|
|
@ -14,7 +14,7 @@ apply plugin: 'elasticsearch.internal-testclusters'
|
|||
apply plugin: 'elasticsearch.standalone-rest-test'
|
||||
apply plugin: 'elasticsearch.bwc-test'
|
||||
|
||||
BuildParams.bwcVersions.withIndexCompatiple { bwcVersion, baseName ->
|
||||
BuildParams.bwcVersions.withIndexCompatible { bwcVersion, baseName ->
|
||||
def baseCluster = testClusters.register(baseName) {
|
||||
version = bwcVersion.toString()
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
|
|
|
@ -15,7 +15,7 @@ dependencies {
|
|||
|
||||
tasks.named("integTest").configure { enabled = false }
|
||||
|
||||
BuildParams.bwcVersions.withWireCompatiple(v -> v.onOrAfter("7.10.0") &&
|
||||
BuildParams.bwcVersions.withWireCompatible(v -> v.onOrAfter("7.10.0") &&
|
||||
v != VersionProperties.getElasticsearchVersion()) { bwcVersion, baseName ->
|
||||
def cluster = testClusters.register(baseName) {
|
||||
versions = [bwcVersion.toString(), project.version]
|
||||
|
@ -49,4 +49,4 @@ BuildParams.bwcVersions.withWireCompatiple(v -> v.onOrAfter("7.10.0") &&
|
|||
tasks.register(bwcTaskName(bwcVersion)) {
|
||||
dependsOn "${baseName}#mixedClusterTest"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ tasks.register("copyTestNodeKeyMaterial", Copy) {
|
|||
into outputDir
|
||||
}
|
||||
|
||||
BuildParams.bwcVersions.withIndexCompatiple { bwcVersion, baseName ->
|
||||
BuildParams.bwcVersions.withWireCompatible { bwcVersion, baseName ->
|
||||
def baseCluster = testClusters.register(baseName) {
|
||||
testDistribution = "DEFAULT"
|
||||
versions = [bwcVersion.toString(), project.version]
|
||||
|
|
|
@ -37,7 +37,7 @@ tasks.register("copyTestNodeKeyMaterial", Copy) {
|
|||
into outputDir
|
||||
}
|
||||
|
||||
BuildParams.bwcVersions.withWireCompatiple { bwcVersion, baseName ->
|
||||
BuildParams.bwcVersions.withWireCompatible { bwcVersion, baseName ->
|
||||
String oldVersion = bwcVersion.toString()
|
||||
|
||||
// SearchableSnapshotsRollingUpgradeIT uses a specific repository to not interfere with other tests
|
||||
|
|
|
@ -71,7 +71,7 @@ subprojects {
|
|||
}
|
||||
|
||||
// Configure compatibility testing tasks
|
||||
BuildParams.bwcVersions.withIndexCompatiple { bwcVersion, baseName ->
|
||||
BuildParams.bwcVersions.withWireCompatible { bwcVersion, baseName ->
|
||||
// Compatibility testing for JDBC driver started with version 7.9.0
|
||||
if (bwcVersion.onOrAfter(Version.fromString("7.9.0")) && (bwcVersion.equals(VersionProperties.elasticsearchVersion) == false)) {
|
||||
UnreleasedVersionInfo unreleasedVersion = BuildParams.bwcVersions.unreleasedInfo(bwcVersion)
|
||||
|
|
|
@ -21,7 +21,7 @@ testClusters.configureEach {
|
|||
tasks.named("integTest").configure{ enabled = false}
|
||||
|
||||
// A bug (https://github.com/elastic/elasticsearch/issues/68439) limits us to perform tests with versions from 7.10.3 onwards
|
||||
BuildParams.bwcVersions.withWireCompatiple(v -> v.onOrAfter("7.10.3") &&
|
||||
BuildParams.bwcVersions.withWireCompatible(v -> v.onOrAfter("7.10.3") &&
|
||||
v != VersionProperties.getElasticsearchVersion()) { bwcVersion, baseName ->
|
||||
|
||||
def baseCluster = testClusters.register(baseName) {
|
||||
|
|
|
@ -29,7 +29,7 @@ tasks.register("copyTestNodeKeyMaterial", Copy) {
|
|||
into outputDir
|
||||
}
|
||||
|
||||
BuildParams.bwcVersions.withIndexCompatiple { bwcVersion, baseName ->
|
||||
BuildParams.bwcVersions.withWireCompatible { bwcVersion, baseName ->
|
||||
def baseCluster = testClusters.register(baseName) {
|
||||
testDistribution = "DEFAULT"
|
||||
versions = [bwcVersion.toString(), project.version]
|
||||
|
|
|
@ -12,7 +12,7 @@ dependencies {
|
|||
}
|
||||
|
||||
// Only run tests for 7.9+, since the node.roles setting was introduced in 7.9.0
|
||||
BuildParams.bwcVersions.withWireCompatiple(v -> v.onOrAfter("7.9.0") &&
|
||||
BuildParams.bwcVersions.withWireCompatible(v -> v.onOrAfter("7.9.0") &&
|
||||
v != VersionProperties.getElasticsearchVersion()) { bwcVersion, baseName ->
|
||||
|
||||
def baseCluster = testClusters.register(baseName) {
|
||||
|
|
|
@ -9,7 +9,7 @@ dependencies {
|
|||
testImplementation project(':x-pack:qa')
|
||||
}
|
||||
|
||||
BuildParams.bwcVersions.withWireCompatiple { bwcVersion, baseName ->
|
||||
BuildParams.bwcVersions.withWireCompatible { bwcVersion, baseName ->
|
||||
def baseCluster = testClusters.register(baseName) {
|
||||
testDistribution = "DEFAULT"
|
||||
versions = [bwcVersion.toString(), project.version]
|
||||
|
|
|
@ -9,7 +9,7 @@ dependencies {
|
|||
testImplementation project(':x-pack:qa')
|
||||
}
|
||||
|
||||
BuildParams.bwcVersions.withWireCompatiple { bwcVersion, baseName ->
|
||||
BuildParams.bwcVersions.withWireCompatible { bwcVersion, baseName ->
|
||||
|
||||
def baseLeaderCluster = testClusters.register("${baseName}-leader") {
|
||||
numberOfNodes = 3
|
||||
|
|
|
@ -30,7 +30,7 @@ tasks.register("copyTestNodeKeyMaterial", Copy) {
|
|||
into outputDir
|
||||
}
|
||||
|
||||
BuildParams.bwcVersions.withWireCompatiple { bwcVersion, baseName ->
|
||||
BuildParams.bwcVersions.withWireCompatible { bwcVersion, baseName ->
|
||||
String oldVersion = bwcVersion.toString()
|
||||
|
||||
// SearchableSnapshotsRollingUpgradeIT uses a specific repository to not interfere with other tests
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue