diff --git a/build.gradle b/build.gradle index b840d4f51..c75dec268 100644 --- a/build.gradle +++ b/build.gradle @@ -524,15 +524,19 @@ List> plugins = [ task "${baseName}#mixedClusterTask"(type: StandaloneRestIntegTestTask) { 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 { + doFirst { + if (opensearch_major_version == bwc_major_version) { testClusters."${baseName}0".upgradeNodeAndPluginToNextVersion(plugins) + } else { + testClusters."${baseName}0".upgradeAllNodesAndPluginsToNextVersion(plugins) } - filter { + } + filter { + if (opensearch_major_version == bwc_major_version) { includeTestsMatching "org.opensearch.flowframework.bwc.*IT" + } else { + exclude '**/*Test*' + exclude '**/*IT*' } } systemProperty 'tests.rest.bwcsuite', 'mixed_cluster' @@ -546,18 +550,14 @@ 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) { + onlyIf { opensearch_major_version == bwc_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 +570,17 @@ task "${baseName}#twoThirdsUpgradedClusterTask"(type: StandaloneRestIntegTestTas // This results in a fully upgraded cluster. // This is used for rolling upgrade. task "${baseName}#rollingUpgradeClusterTask"(type: StandaloneRestIntegTestTask) { - 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 { + if (opensearch_major_version == bwc_major_version) { + dependsOn "${baseName}#twoThirdsUpgradedClusterTask" doFirst { testClusters."${baseName}0".upgradeNodeAndPluginToNextVersion(plugins) } - filter { - includeTestsMatching "org.opensearch.flowframework.bwc.*IT" - } + } else { + dependsOn "${baseName}#mixedClusterTask" + } + useCluster testClusters."${baseName}0" + filter { + includeTestsMatching "org.opensearch.flowframework.bwc.*IT" } mustRunAfter "${baseName}#mixedClusterTask" systemProperty 'tests.rest.bwcsuite', 'mixed_cluster'