diff --git a/muted-tests.yml b/muted-tests.yml index 86e316997d36a..5ea19c42e5510 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -615,57 +615,9 @@ tests: - class: org.elasticsearch.upgrades.SearchableSnapshotsRollingUpgradeIT method: testBlobStoreCacheWithFullCopyInMixedVersions issue: https://github.com/elastic/elasticsearch/issues/135474 -- class: org.elasticsearch.upgrades.SyntheticSourceRollingUpgradeIT - method: testIndexing {upgradedNodes=3} - issue: https://github.com/elastic/elasticsearch/issues/135338 - class: org.elasticsearch.xpack.esql.qa.multi_node.GenerativeIT method: test issue: https://github.com/elastic/elasticsearch/issues/134407 -- class: org.elasticsearch.upgrades.LogsUsageRollingUpgradeIT - method: testUsage {upgradedNodes=3} - issue: https://github.com/elastic/elasticsearch/issues/135312 -- class: org.elasticsearch.upgrades.NoLogsUsageRollingUpgradeIT - method: testUsage {upgradedNodes=3} - issue: https://github.com/elastic/elasticsearch/issues/135316 -- class: org.elasticsearch.upgrades.LogsdbIndexingRollingUpgradeIT - method: testIndexing {upgradedNodes=3} - issue: https://github.com/elastic/elasticsearch/issues/135320 -- class: org.elasticsearch.upgrades.TextRollingUpgradeIT - method: testIndexing {upgradedNodes=3} - issue: https://github.com/elastic/elasticsearch/issues/135237 -- class: org.elasticsearch.upgrades.StandardToLogsDbIndexModeRollingUpgradeIT - method: testLogsIndexing {upgradedNodes=3} - issue: https://github.com/elastic/elasticsearch/issues/135315 -- class: org.elasticsearch.upgrades.MatchOnlyTextRollingUpgradeIT - method: testIndexing {upgradedNodes=3} - issue: https://github.com/elastic/elasticsearch/issues/135324 -- class: org.elasticsearch.upgrades.LogsdbIndexingRollingUpgradeIT - method: testIndexing {upgradedNodes=2} - issue: https://github.com/elastic/elasticsearch/issues/135327 -- class: org.elasticsearch.upgrades.TextRollingUpgradeIT - method: testIndexing {upgradedNodes=2} - issue: https://github.com/elastic/elasticsearch/issues/135238 -- class: org.elasticsearch.upgrades.TextRollingUpgradeIT - method: testIndexing {upgradedNodes=1} - issue: https://github.com/elastic/elasticsearch/issues/135236 -- class: org.elasticsearch.upgrades.SyntheticSourceRollingUpgradeIT - method: testIndexing {upgradedNodes=2} - issue: https://github.com/elastic/elasticsearch/issues/135344 -- class: org.elasticsearch.upgrades.MatchOnlyTextRollingUpgradeIT - method: testIndexing {upgradedNodes=2} - issue: https://github.com/elastic/elasticsearch/issues/135325 -- class: org.elasticsearch.upgrades.LogsdbIndexingRollingUpgradeIT - method: testIndexing {upgradedNodes=1} - issue: https://github.com/elastic/elasticsearch/issues/135511 -- class: org.elasticsearch.upgrades.SyntheticSourceRollingUpgradeIT - method: testIndexing {upgradedNodes=1} - issue: https://github.com/elastic/elasticsearch/issues/135512 -- class: org.elasticsearch.upgrades.MatchOnlyTextRollingUpgradeIT - method: testIndexing {upgradedNodes=1} - issue: https://github.com/elastic/elasticsearch/issues/135525 -- class: org.elasticsearch.upgrades.NoLogsUsageRollingUpgradeIT - method: testUsage {upgradedNodes=2} - issue: https://github.com/elastic/elasticsearch/issues/135319 # Examples: # diff --git a/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/ParameterizedFullClusterRestartTestCase.java b/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/ParameterizedFullClusterRestartTestCase.java index 5c83fee97cdca..b4ad764546c6f 100644 --- a/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/ParameterizedFullClusterRestartTestCase.java +++ b/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/ParameterizedFullClusterRestartTestCase.java @@ -100,9 +100,16 @@ public void extractOldIndexVersion() throws Exception { } } + protected void beforeUpgrade() { + if (getOldClusterVersion().endsWith("-SNAPSHOT")) { + assumeTrue("rename of pattern_text mapper", oldClusterHasFeature("mapper.pattern_text_rename")); + } + } + @Before public void maybeUpgrade() throws Exception { if (upgraded == false && requestedUpgradeStatus == UPGRADED) { + beforeUpgrade(); try { if (getOldClusterTestVersion().before(MINIMUM_WIRE_COMPATIBLE_VERSION)) { // First upgrade to latest wire compatible version diff --git a/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/ParameterizedRollingUpgradeTestCase.java b/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/ParameterizedRollingUpgradeTestCase.java index 43a9081964483..41a60a2880afb 100644 --- a/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/ParameterizedRollingUpgradeTestCase.java +++ b/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/ParameterizedRollingUpgradeTestCase.java @@ -54,6 +54,12 @@ public static Iterable parameters() { protected abstract ElasticsearchCluster getUpgradeCluster(); + protected void beforeUpgrade() { + if (getOldClusterVersion().endsWith("-SNAPSHOT")) { + assumeTrue("rename of pattern_text mapper", oldClusterHasFeature("mapper.pattern_text_rename")); + } + } + @Before public void upgradeNode() throws Exception { // extract old cluster features @@ -96,6 +102,8 @@ public void upgradeNode() throws Exception { // Skip remaining tests if upgrade failed assumeFalse("Cluster upgrade failed", upgradeFailed); + beforeUpgrade(); + // finally, upgrade node if (upgradedNodes.size() < requestedUpgradedNodes) { closeClients(); diff --git a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/LogsUsageRollingUpgradeIT.java b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/LogsUsageRollingUpgradeIT.java index ebeaf84aba7be..6fea6917bebc0 100644 --- a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/LogsUsageRollingUpgradeIT.java +++ b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/LogsUsageRollingUpgradeIT.java @@ -11,9 +11,7 @@ import com.carrotsearch.randomizedtesting.annotations.Name; -import org.elasticsearch.Build; import org.elasticsearch.client.Request; -import org.junit.Before; import java.io.IOException; import java.time.Instant; @@ -31,13 +29,6 @@ public LogsUsageRollingUpgradeIT(@Name("upgradedNodes") int upgradedNodes) { super(upgradedNodes); } - @Before - public void checkFeatures() { - if (Build.current().isSnapshot()) { - assumeTrue("rename of pattern_text mapper", oldClusterHasFeature("mapper.pattern_text_rename")); - } - } - public void testUsage() throws Exception { assumeFalse("logsdb.prior_logs_usage only gets set in 8.x", oldClusterHasFeature("gte_v9.0.0")); String dataStreamName = "logs-mysql-error"; diff --git a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/LogsdbIndexingRollingUpgradeIT.java b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/LogsdbIndexingRollingUpgradeIT.java index 5cf20d7254b85..48a709a66fa9e 100644 --- a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/LogsdbIndexingRollingUpgradeIT.java +++ b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/LogsdbIndexingRollingUpgradeIT.java @@ -11,7 +11,6 @@ import com.carrotsearch.randomizedtesting.annotations.Name; -import org.elasticsearch.Build; import org.elasticsearch.client.Request; import org.elasticsearch.client.Response; import org.elasticsearch.client.ResponseException; @@ -21,7 +20,6 @@ import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.test.rest.ObjectPath; import org.elasticsearch.xcontent.XContentType; -import org.junit.Before; import java.io.IOException; import java.io.InputStream; @@ -76,13 +74,6 @@ public LogsdbIndexingRollingUpgradeIT(@Name("upgradedNodes") int upgradedNodes) super(upgradedNodes); } - @Before - public void checkFeatures() { - if (Build.current().isSnapshot()) { - assumeTrue("rename of pattern_text mapper", oldClusterHasFeature("mapper.pattern_text_rename")); - } - } - public void testIndexing() throws Exception { String dataStreamName = "logs-bwc-test"; if (isOldCluster()) { diff --git a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/MatchOnlyTextRollingUpgradeIT.java b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/MatchOnlyTextRollingUpgradeIT.java index 88209e9b04fef..ab1f7e2e4480f 100644 --- a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/MatchOnlyTextRollingUpgradeIT.java +++ b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/MatchOnlyTextRollingUpgradeIT.java @@ -11,7 +11,6 @@ import com.carrotsearch.randomizedtesting.annotations.Name; -import org.elasticsearch.Build; import org.elasticsearch.client.Request; import org.elasticsearch.client.Response; import org.elasticsearch.client.ResponseException; @@ -22,7 +21,6 @@ import org.elasticsearch.index.mapper.MapperFeatures; import org.elasticsearch.test.rest.ObjectPath; import org.elasticsearch.xcontent.XContentType; -import org.junit.Before; import java.io.IOException; import java.io.InputStream; @@ -92,13 +90,6 @@ public MatchOnlyTextRollingUpgradeIT(@Name("upgradedNodes") int upgradedNodes) { super(upgradedNodes); } - @Before - public void checkFeatures() { - if (Build.current().isSnapshot()) { - assumeTrue("rename of pattern_text mapper", oldClusterHasFeature("mapper.pattern_text_rename")); - } - } - public void testIndexing() throws Exception { assumeTrue( "Match only text block loader fix is not present in this cluster", diff --git a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/NoLogsUsageRollingUpgradeIT.java b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/NoLogsUsageRollingUpgradeIT.java index 053b0f0ce4b7a..efb93e4782c11 100644 --- a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/NoLogsUsageRollingUpgradeIT.java +++ b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/NoLogsUsageRollingUpgradeIT.java @@ -11,9 +11,6 @@ import com.carrotsearch.randomizedtesting.annotations.Name; -import org.elasticsearch.Build; -import org.junit.Before; - import java.time.Instant; import java.util.Map; @@ -29,13 +26,6 @@ public NoLogsUsageRollingUpgradeIT(@Name("upgradedNodes") int upgradedNodes) { super(upgradedNodes); } - @Before - public void checkFeatures() { - if (Build.current().isSnapshot()) { - assumeTrue("rename of pattern_text mapper", oldClusterHasFeature("mapper.pattern_text_rename")); - } - } - public void testUsage() throws Exception { String dataStreamName = "logs-mysql-error"; if (isOldCluster()) { diff --git a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/StandardToLogsDbIndexModeRollingUpgradeIT.java b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/StandardToLogsDbIndexModeRollingUpgradeIT.java index dbaac0124fc3c..e8cf3027ac067 100644 --- a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/StandardToLogsDbIndexModeRollingUpgradeIT.java +++ b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/StandardToLogsDbIndexModeRollingUpgradeIT.java @@ -11,7 +11,6 @@ import com.carrotsearch.randomizedtesting.annotations.Name; -import org.elasticsearch.Build; import org.elasticsearch.client.Request; import org.elasticsearch.client.Response; import org.elasticsearch.client.RestClient; @@ -25,7 +24,6 @@ import org.elasticsearch.test.cluster.local.distribution.DistributionType; import org.hamcrest.Matcher; import org.hamcrest.Matchers; -import org.junit.Before; import org.junit.ClassRule; import java.io.IOException; @@ -116,13 +114,6 @@ protected Settings restClientSettings() { } }"""; - @Before - public void checkFeatures() { - if (Build.current().isSnapshot()) { - assumeTrue("rename of pattern_text mapper", oldClusterHasFeature("mapper.pattern_text_rename")); - } - } - public void testLogsIndexing() throws IOException { if (isOldCluster()) { // given - create a template and data stream diff --git a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/SyntheticSourceRollingUpgradeIT.java b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/SyntheticSourceRollingUpgradeIT.java index f48e5305a74b3..2d00366605350 100644 --- a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/SyntheticSourceRollingUpgradeIT.java +++ b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/SyntheticSourceRollingUpgradeIT.java @@ -11,11 +11,9 @@ import com.carrotsearch.randomizedtesting.annotations.Name; -import org.elasticsearch.Build; import org.elasticsearch.client.Request; import org.elasticsearch.test.rest.ObjectPath; import org.hamcrest.Matchers; -import org.junit.Before; import java.time.Instant; import java.util.Arrays; @@ -72,13 +70,6 @@ public SyntheticSourceRollingUpgradeIT(@Name("upgradedNodes") int upgradedNodes) super(upgradedNodes); } - @Before - public void checkFeatures() { - if (Build.current().isSnapshot()) { - assumeTrue("rename of pattern_text mapper", oldClusterHasFeature("mapper.pattern_text_rename")); - } - } - public void testIndexing() throws Exception { assumeTrue("requires storing leaf array offsets", oldClusterHasFeature("gte_v9.1.0")); String dataStreamName = "logs-bwc-test"; diff --git a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/TextRollingUpgradeIT.java b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/TextRollingUpgradeIT.java index 942140935963c..0f0995d4550ce 100644 --- a/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/TextRollingUpgradeIT.java +++ b/x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/TextRollingUpgradeIT.java @@ -9,7 +9,6 @@ import com.carrotsearch.randomizedtesting.annotations.Name; -import org.elasticsearch.Build; import org.elasticsearch.client.Request; import org.elasticsearch.client.Response; import org.elasticsearch.client.ResponseException; @@ -19,7 +18,6 @@ import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.test.rest.ObjectPath; import org.elasticsearch.xcontent.XContentType; -import org.junit.Before; import java.io.IOException; import java.io.InputStream; @@ -89,13 +87,6 @@ public TextRollingUpgradeIT(@Name("upgradedNodes") int upgradedNodes) { super(upgradedNodes); } - @Before - public void checkFeatures() { - if (Build.current().isSnapshot()) { - assumeTrue("rename of pattern_text mapper", oldClusterHasFeature("mapper.pattern_text_rename")); - } - } - public void testIndexing() throws Exception { if (isOldCluster()) {