From 0d0ec31bf3887f9596766491a9ef47138ce0aa9c Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Thu, 23 Jan 2025 19:06:55 +0100 Subject: [PATCH] iter --- .../elasticsearch/index/mapper/SourceFieldMapperTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/index/mapper/SourceFieldMapperTests.java b/server/src/test/java/org/elasticsearch/index/mapper/SourceFieldMapperTests.java index 5739f3fae7a45..8ad37908b2e9c 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/SourceFieldMapperTests.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/SourceFieldMapperTests.java @@ -235,8 +235,8 @@ public void testSyntheticUpdates() throws Exception { public void testSyntheticUpdatesLegacy() throws Exception { var mappings = XContentBuilder.builder(XContentType.JSON.xContent()).startObject().startObject("_doc").startObject("_source"); mappings.field("mode", "synthetic").endObject().endObject().endObject(); - // one version before SOURCE_MAPPER_MODE_ATTRIBUTE_NOOP - MapperService mapperService = createMapperService(IndexVersions.LOGSB_OPTIONAL_SORTING_ON_HOST_NAME, mappings); + var version = IndexVersionUtils.getPreviousVersion(IndexVersions.SOURCE_MAPPER_MODE_ATTRIBUTE_NOOP); + MapperService mapperService = createMapperService(version, mappings); SourceFieldMapper mapper = mapperService.documentMapper().sourceMapper(); assertTrue(mapper.enabled()); assertTrue(mapper.isSynthetic());