Skip to content

Commit

Permalink
Fixing some tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
afoucret committed Oct 28, 2024
1 parent 8fe7d28 commit a0e34c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ protected TermsQueryBuilder doCreateTestQueryBuilder() {
// make between 0 and 5 different values of the same type
String fieldName = randomValueOtherThanMany(
choice -> choice.equals(GEO_POINT_FIELD_NAME)
|| choice.equals(BINARY_FIELD_NAME)
|| choice.equals(GEO_POINT_ALIAS_FIELD_NAME)
|| choice.equals(INT_RANGE_FIELD_NAME)
|| choice.equals(DATE_ALIAS_FIELD_NAME)
Expand Down Expand Up @@ -116,6 +117,7 @@ protected void doAssertLuceneQuery(TermsQueryBuilder queryBuilder, Query query,

// we only do the check below for string fields (otherwise we'd have to decode the values)
if (queryBuilder.fieldName().equals(INT_FIELD_NAME)
|| queryBuilder.fieldName().equals(INT_ALIAS_FIELD_NAME)
|| queryBuilder.fieldName().equals(DOUBLE_FIELD_NAME)
|| queryBuilder.fieldName().equals(BOOLEAN_FIELD_NAME)
|| queryBuilder.fieldName().equals(DATE_FIELD_NAME)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,7 @@ protected static Object getRandomValueForFieldName(String fieldName) {
}
break;
case INT_FIELD_NAME:
case INT_ALIAS_FIELD_NAME:
value = randomIntBetween(0, 10);
break;
case DOUBLE_FIELD_NAME:
Expand Down Expand Up @@ -815,6 +816,7 @@ protected static String getRandomRewriteMethod() {
protected static Fuzziness randomFuzziness(String fieldName) {
switch (fieldName) {
case INT_FIELD_NAME:
case INT_ALIAS_FIELD_NAME:
case DOUBLE_FIELD_NAME:
case DATE_FIELD_NAME:
case DATE_NANOS_FIELD_NAME:
Expand Down

0 comments on commit a0e34c4

Please sign in to comment.