Skip to content

Commit 38260aa

Browse files
authored
[Test] Fix index.mapping.total_fields.limit random update (#119728)
It's stupid to pick a low value for `index.mapping.total_fields.limit` when at the same time you also add random runtime fields => pick a value large enough to avoid failing future random mapping updates. Closes #119646 Closes #119632 Closes #119631
1 parent ee7848e commit 38260aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qa/lucene-index-compatibility/src/javaRestTest/java/org/elasticsearch/lucene/AbstractIndexCompatibilityTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ protected static void updateRandomIndexSettings(String indexName) throws IOExcep
207207
switch (i) {
208208
case 0 -> settings.putList(IndexSettings.DEFAULT_FIELD_SETTING.getKey(), "field_" + randomInt(2));
209209
case 1 -> settings.put(IndexSettings.MAX_INNER_RESULT_WINDOW_SETTING.getKey(), randomIntBetween(1, 100));
210-
case 2 -> settings.put(MapperService.INDEX_MAPPING_TOTAL_FIELDS_LIMIT_SETTING.getKey(), randomLongBetween(0L, 1000L));
210+
case 2 -> settings.put(MapperService.INDEX_MAPPING_TOTAL_FIELDS_LIMIT_SETTING.getKey(), randomLongBetween(100L, 1000L));
211211
case 3 -> settings.put(IndexSettings.MAX_SLICES_PER_SCROLL.getKey(), randomIntBetween(1, 1024));
212212
default -> throw new IllegalStateException();
213213
}

0 commit comments

Comments
 (0)