Skip to content

Commit

Permalink
Remove UpdateForV9 in PersistedClusterStateServiceTests (elastic#119046)
Browse files Browse the repository at this point in the history
The testOverrideLuceneVersion is renamed to testOverrideNodeVersion. While it
updates the user data on the lucene index, it does not override the lucene version.

The UpdateForV9 does not require further action.
  • Loading branch information
javanna authored Dec 19, 2024
1 parent c8d2c7d commit 22c2db8
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
import org.elasticsearch.common.unit.ByteSizeValue;
import org.elasticsearch.core.IOUtils;
import org.elasticsearch.core.TimeValue;
import org.elasticsearch.core.UpdateForV9;
import org.elasticsearch.env.BuildVersion;
import org.elasticsearch.env.Environment;
import org.elasticsearch.env.NodeEnvironment;
Expand Down Expand Up @@ -1392,7 +1391,7 @@ public void testLimitsFileCount() throws IOException {
}
}

public void testOverrideLuceneVersion() throws IOException {
public void testOverrideNodeVersion() throws IOException {
try (NodeEnvironment nodeEnvironment = newNodeEnvironment(createDataPaths())) {
final PersistedClusterStateService persistedClusterStateService = newPersistedClusterStateService(nodeEnvironment);
final String clusterUUID = UUIDs.randomBase64UUID(random());
Expand All @@ -1415,9 +1414,7 @@ public void testOverrideLuceneVersion() throws IOException {
assertThat(clusterState.metadata().version(), equalTo(version));

}
@UpdateForV9(owner = UpdateForV9.Owner.SEARCH_FOUNDATIONS)
BuildVersion overrideVersion = BuildVersion.fromVersionId(Version.V_8_0_0.id);

NodeMetadata prevMetadata = PersistedClusterStateService.nodeMetadata(persistedClusterStateService.getDataPaths());
assertEquals(BuildVersion.current(), prevMetadata.nodeVersion());
PersistedClusterStateService.overrideVersion(overrideVersion, persistedClusterStateService.getDataPaths());
Expand Down

0 comments on commit 22c2db8

Please sign in to comment.