diff --git a/build.gradle b/build.gradle index b840d4f51..f6d9b80e3 100644 --- a/build.gradle +++ b/build.gradle @@ -522,18 +522,15 @@ List> plugins = [ // This results in a mixed cluster with 2 nodes on the old version and 1 upgraded node. // This is also used as a one third upgraded cluster for a rolling upgrade. task "${baseName}#mixedClusterTask"(type: StandaloneRestIntegTestTask) { + // Only do mixed cluster tasks on same major version + onlyIf { bwc_major_version == opensearch_major_version } dependsOn "${baseName}#oldVersionClusterTask0" useCluster testClusters."${baseName}0" - // Only do mixed cluster tasks on same major version - if (bwc_major_version != opensearch_major_version) { - ignoreFailures = true - } else { - doFirst { - testClusters."${baseName}0".upgradeNodeAndPluginToNextVersion(plugins) - } - filter { - includeTestsMatching "org.opensearch.flowframework.bwc.*IT" - } + doFirst { + testClusters."${baseName}0".upgradeNodeAndPluginToNextVersion(plugins) + } + filter { + includeTestsMatching "org.opensearch.flowframework.bwc.*IT" } systemProperty 'tests.rest.bwcsuite', 'mixed_cluster' systemProperty 'tests.rest.bwcsuite_round', 'first' @@ -546,18 +543,15 @@ task "${baseName}#mixedClusterTask"(type: StandaloneRestIntegTestTask) { // This results in a mixed cluster with 1 node on the old version and 2 upgraded nodes. // This is used for rolling upgrade. task "${baseName}#twoThirdsUpgradedClusterTask"(type: StandaloneRestIntegTestTask) { + // Only do mixed cluster tasks on same major version + onlyIf { bwc_major_version == opensearch_major_version } dependsOn "${baseName}#mixedClusterTask" useCluster testClusters."${baseName}0" - // Only do mixed cluster tasks on same major version - if (bwc_major_version != opensearch_major_version) { - ignoreFailures = true - } else { - doFirst { - testClusters."${baseName}0".upgradeNodeAndPluginToNextVersion(plugins) - } - filter { - includeTestsMatching "org.opensearch.flowframework.bwc.*IT" - } + doFirst { + testClusters."${baseName}0".upgradeNodeAndPluginToNextVersion(plugins) + } + filter { + includeTestsMatching "org.opensearch.flowframework.bwc.*IT" } systemProperty 'tests.rest.bwcsuite', 'mixed_cluster' systemProperty 'tests.rest.bwcsuite_round', 'second' @@ -570,18 +564,15 @@ task "${baseName}#twoThirdsUpgradedClusterTask"(type: StandaloneRestIntegTestTas // This results in a fully upgraded cluster. // This is used for rolling upgrade. task "${baseName}#rollingUpgradeClusterTask"(type: StandaloneRestIntegTestTask) { + // Only do mixed cluster tasks on same major version + onlyIf { bwc_major_version == opensearch_major_version } dependsOn "${baseName}#twoThirdsUpgradedClusterTask" useCluster testClusters."${baseName}0" - // Only do mixed cluster tasks on same major version - if (bwc_major_version != opensearch_major_version) { - ignoreFailures = true - } else { - doFirst { - testClusters."${baseName}0".upgradeNodeAndPluginToNextVersion(plugins) - } - filter { - includeTestsMatching "org.opensearch.flowframework.bwc.*IT" - } + doFirst { + testClusters."${baseName}0".upgradeNodeAndPluginToNextVersion(plugins) + } + filter { + includeTestsMatching "org.opensearch.flowframework.bwc.*IT" } mustRunAfter "${baseName}#mixedClusterTask" systemProperty 'tests.rest.bwcsuite', 'mixed_cluster' @@ -613,8 +604,10 @@ task bwcTestSuite(type: StandaloneRestIntegTestTask) { exclude '**/*Test*' exclude '**/*IT*' - dependsOn tasks.named("${baseName}#mixedClusterTask") - dependsOn tasks.named("${baseName}#rollingUpgradeClusterTask") + if (bwc_major_version != opensearch_major_version) { + dependsOn tasks.named("${baseName}#mixedClusterTask") + dependsOn tasks.named("${baseName}#rollingUpgradeClusterTask") + } dependsOn tasks.named("${baseName}#fullRestartClusterTask") }