Skip to content

Commit

Permalink
EXPER - fix the MapperServiceTests by extending the max length of fie…
Browse files Browse the repository at this point in the history
…ld name in the test
  • Loading branch information
Tianli Feng committed Feb 23, 2021
1 parent 55203b9 commit 0efae0a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ public void testDefaultMappingIsRejectedOn7() throws IOException {
}

public void testFieldNameLengthLimit() throws Throwable {
int maxFieldNameLength = randomIntBetween(15, 20);
int maxFieldNameLength = randomIntBetween(25, 30); // extend the max length due to "_data_stream_timestamp"
String testString = new String(new char[maxFieldNameLength + 1]).replace("\0", "a");
Settings settings = Settings.builder().put(MapperService.INDEX_MAPPING_FIELD_NAME_LENGTH_LIMIT_SETTING.getKey(), maxFieldNameLength)
.build();
Expand Down Expand Up @@ -376,7 +376,7 @@ public void testObjectNameLengthLimit() throws Throwable {
}

public void testAliasFieldNameLengthLimit() throws Throwable {
int maxFieldNameLength = randomIntBetween(15, 20);
int maxFieldNameLength = randomIntBetween(25, 30); // extend the max length due to "_data_stream_timestamp"
String testString = new String(new char[maxFieldNameLength + 1]).replace("\0", "a");
Settings settings = Settings.builder().put(MapperService.INDEX_MAPPING_FIELD_NAME_LENGTH_LIMIT_SETTING.getKey(), maxFieldNameLength)
.build();
Expand Down

0 comments on commit 0efae0a

Please sign in to comment.