From e89f70f1ded20c47b3af298f8f1f347e50b4d7e0 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 | 33 ------------------- .../FullClusterRestartDownsampleIT.java | 2 +- .../upgrades/FullClusterRestartIT.java | 2 +- 3 files changed, 2 insertions(+), 35 deletions(-) diff --git a/muted-tests.yml b/muted-tests.yml index 86f16b4c42239..f7c081f3a6be8 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -633,45 +633,12 @@ tests: - class: org.elasticsearch.xpack.logsdb.qa.BulkDynamicMappingChallengeRestIT method: testMatchAllQuery issue: https://github.com/elastic/elasticsearch/issues/135820 -- class: org.elasticsearch.upgrades.FullClusterRestartDownsampleIT - method: testRollupIndex {cluster=UPGRADED} - issue: https://github.com/elastic/elasticsearch/issues/135906 -- class: org.elasticsearch.upgrades.FullClusterRestartIT - method: testSingleDoc {cluster=UPGRADED} - issue: https://github.com/elastic/elasticsearch/issues/135908 -- class: org.elasticsearch.upgrades.FullClusterRestartIT - method: testRollover {cluster=UPGRADED} - issue: https://github.com/elastic/elasticsearch/issues/135952 - class: org.elasticsearch.datastreams.DataStreamIndexSettingsProviderTests method: testGetAdditionalIndexSettingsMappingsMerging issue: https://github.com/elastic/elasticsearch/issues/135884 - class: org.elasticsearch.xpack.esql.action.CrossClusterAsyncQueryStopIT method: testStopQueryInlineStats issue: https://github.com/elastic/elasticsearch/issues/135032 -- class: org.elasticsearch.upgrades.FullClusterRestartIT - method: testResize {cluster=UPGRADED} - issue: https://github.com/elastic/elasticsearch/issues/135909 -- class: org.elasticsearch.upgrades.FullClusterRestartIT - method: testSearchTimeSeriesMode {cluster=UPGRADED} - issue: https://github.com/elastic/elasticsearch/issues/135963 -- class: org.elasticsearch.upgrades.FullClusterRestartIT - method: testClusterState {cluster=UPGRADED} - issue: https://github.com/elastic/elasticsearch/issues/135960 -- class: org.elasticsearch.upgrades.FullClusterRestartIT - method: testForbidDisableSoftDeletesOnRestore {cluster=UPGRADED} - issue: https://github.com/elastic/elasticsearch/issues/135937 -- class: org.elasticsearch.upgrades.FullClusterRestartIT - method: testRomanianAnalyzerBWC {cluster=UPGRADED} - issue: https://github.com/elastic/elasticsearch/issues/135948 -- class: org.elasticsearch.upgrades.FullClusterRestartIT - method: testRecovery {cluster=UPGRADED} - issue: https://github.com/elastic/elasticsearch/issues/135953 -- class: org.elasticsearch.upgrades.FullClusterRestartIT - method: testHistoryUUIDIsAdded {cluster=UPGRADED} - issue: https://github.com/elastic/elasticsearch/issues/135957 -- class: org.elasticsearch.upgrades.FullClusterRestartIT - method: testSnapshotRestore {cluster=UPGRADED} - issue: https://github.com/elastic/elasticsearch/issues/135933 # 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"); }