Skip to content

Commit

Permalink
Remove @UpdateForV9 from MetadataMapperTestCase (elastic#113083)
Browse files Browse the repository at this point in the history
I have reviewed the action taken as part of incrementing the major version to 9. The update to the test is correct, we can remove the annotation. Indices created before 8.6 silently ignore the params, I renamed the test method to clarify that.
  • Loading branch information
javanna committed Sep 18, 2024
1 parent 73c40b9 commit f975c87
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import org.elasticsearch.common.compress.CompressedXContent;
import org.elasticsearch.core.CheckedConsumer;
import org.elasticsearch.core.UpdateForV9;
import org.elasticsearch.index.IndexVersion;
import org.elasticsearch.index.IndexVersions;
import org.elasticsearch.index.mapper.MapperService.MergeReason;
Expand Down Expand Up @@ -144,10 +143,7 @@ public final void testFixedMetaFieldsAreNotConfigurable() throws IOException {
assertEquals("Failed to parse mapping: " + fieldName() + " is not configurable", exception.getMessage());
}

@UpdateForV9
// This was previously testing for index versions between 7.0.0 and 8.6.0 but has been bumped to 8.0.0 - 8.6.0
// Verify this is the correct action.
public void testTypeAndFriendsAreAcceptedBefore_8_6_0() throws IOException {
public void testTypeAndFriendsAreSilentlyIgnoredBefore_8_6_0() throws IOException {
assumeTrue("Metadata field " + fieldName() + " isn't configurable", isConfigurable());
IndexVersion previousVersion = IndexVersionUtils.getPreviousVersion(IndexVersions.V_8_6_0);
IndexVersion version = IndexVersionUtils.randomVersionBetween(random(), IndexVersions.MINIMUM_COMPATIBLE, previousVersion);
Expand Down

0 comments on commit f975c87

Please sign in to comment.