From 470db5dd5b64c8ad8ff1bcc7dba6dfd24a622a0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20J=C3=B3zala?= <377355+jozala@users.noreply.github.com> Date: Tue, 7 Oct 2025 18:41:24 +0200 Subject: [PATCH] Fix lucene compat tests by keeping asserts disabled (#136094) These asserts have been enabled for the lucene compat because `oldVersion` is now correctly set after #134584. Previously, in the Lucene compatibility tests, version was always set to `0.0.0` so the asserts were always disabled. Additionally, re-enable the tests that were muted because of the issue (cherry picked from commit b1a861e1a02f0530c1a42e5b53986ecee0fb9212) # Conflicts: # muted-tests.yml --- muted-tests.yml | 27 ------------------- .../FullClusterRestartDownsampleIT.java | 2 +- .../upgrades/FullClusterRestartIT.java | 2 +- 3 files changed, 2 insertions(+), 29 deletions(-) diff --git a/muted-tests.yml b/muted-tests.yml index a3126193b6523..dfbc53a94d39e 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -449,33 +449,6 @@ tests: - class: org.elasticsearch.aggregations.bucket.AggregationReductionCircuitBreakingIT method: testCBTrippingOnReduction issue: https://github.com/elastic/elasticsearch/issues/134902 -- class: org.elasticsearch.upgrades.FullClusterRestartIT - method: testEmptyShard {cluster=UPGRADED} - issue: https://github.com/elastic/elasticsearch/issues/135951 -- class: org.elasticsearch.upgrades.FullClusterRestartIT - method: testSearch {cluster=UPGRADED} - issue: https://github.com/elastic/elasticsearch/issues/135927 -- class: org.elasticsearch.upgrades.FullClusterRestartIT - method: testPersianAnalyzerBWC {cluster=UPGRADED} - issue: https://github.com/elastic/elasticsearch/issues/135930 -- class: org.elasticsearch.upgrades.FullClusterRestartDownsampleIT - method: testRollupIndex {cluster=UPGRADED} - issue: https://github.com/elastic/elasticsearch/issues/135906 -- class: org.elasticsearch.upgrades.FullClusterRestartIT - method: testSystemIndexMetadataIsUpgraded {cluster=UPGRADED} - issue: https://github.com/elastic/elasticsearch/issues/135923 -- class: org.elasticsearch.upgrades.FullClusterRestartIT - method: testNewReplicas {cluster=UPGRADED} - issue: https://github.com/elastic/elasticsearch/issues/135956 -- class: org.elasticsearch.upgrades.FullClusterRestartIT - method: testPeerRecoveryRetentionLeases {cluster=UPGRADED} - issue: https://github.com/elastic/elasticsearch/issues/135929 -- class: org.elasticsearch.upgrades.FullClusterRestartIT - method: testTurnOffTranslogRetentionAfterUpgraded {cluster=UPGRADED} - issue: https://github.com/elastic/elasticsearch/issues/135958 -- class: org.elasticsearch.upgrades.FullClusterRestartIT - method: testOperationBasedRecovery {cluster=UPGRADED} - issue: https://github.com/elastic/elasticsearch/issues/135944 # Examples: # diff --git a/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/FullClusterRestartDownsampleIT.java b/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/FullClusterRestartDownsampleIT.java index 10bbd3dc42e67..3a65f10e07d77 100644 --- a/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/FullClusterRestartDownsampleIT.java +++ b/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/FullClusterRestartDownsampleIT.java @@ -57,7 +57,7 @@ private static ElasticsearchCluster buildCluster() { .apply(() -> clusterConfig) .feature(FeatureFlag.TIME_SERIES_MODE); - if (oldVersion.before(Version.fromString("8.18.0"))) { + if (oldVersion.before(Version.fromString("8.18.0")) || isOldClusterDetachedVersion()) { cluster.jvmArg("-da:org.elasticsearch.index.mapper.DocumentMapper"); cluster.jvmArg("-da:org.elasticsearch.index.mapper.MapperService"); } diff --git a/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/FullClusterRestartIT.java b/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/FullClusterRestartIT.java index b0fda4051bf4b..b5a0928cb21a7 100644 --- a/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/FullClusterRestartIT.java +++ b/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/FullClusterRestartIT.java @@ -118,7 +118,7 @@ private static ElasticsearchCluster buildCluster() { .apply(() -> clusterConfig) .feature(FeatureFlag.TIME_SERIES_MODE); - if (oldVersion.before(Version.fromString("8.18.0"))) { + if (oldVersion.before(Version.fromString("8.18.0")) || isOldClusterDetachedVersion()) { cluster.jvmArg("-da:org.elasticsearch.index.mapper.DocumentMapper"); cluster.jvmArg("-da:org.elasticsearch.index.mapper.MapperService"); }