Skip to content

Commit

Permalink
HSEARCH-3863 Fix log message to check in the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fax4ever committed Feb 8, 2021
1 parent 19cbad0 commit 6eadb2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Expand Up @@ -719,7 +719,7 @@ SearchException customIndexSettingsJsonSyntaxErrors(String filePath, @Cause Exce
@Message(id = ID_OFFSET + 134, value = "Invalid use of 'missing().first()' for an ascending distance sort. Elasticsearch always assumes missing values have a distance of '+Infinity', and this behavior cannot be customized.")
SearchException missingFirstOnAscSortNotSupported(@Param EventContext context);

@Message(id = ID_OFFSET + 135, value = "Invalid use of 'missing().first()' for a descending distance sort. Elasticsearch always assumes missing values have a distance of '+Infinity', and this behavior cannot be customized.")
@Message(id = ID_OFFSET + 135, value = "Invalid use of 'missing().last()' for a descending distance sort. Elasticsearch always assumes missing values have a distance of '+Infinity', and this behavior cannot be customized.")
SearchException missingLastOnDescSortNotSupported(@Param EventContext context);

@Message(id = ID_OFFSET + 136, value = "Invalid use of 'missing().use(...)' for a distance sort. Elasticsearch always assumes missing values have a distance of '+Infinity', and this behavior cannot be customized.")
Expand Down
Expand Up @@ -193,7 +193,8 @@ public void missingValue_explicit() {
.desc().missing().last()
) )
.isInstanceOf( SearchException.class )
.hasMessageContainingAll( "Missing last on sort with descending order is not supported." );
.hasMessageContainingAll( "Invalid use of 'missing().last()' for a descending distance sort.",
"Elasticsearch always assumes missing values have a distance of '+Infinity', and this behavior cannot be customized." );
}
else {
dataSet = dataSetForDesc;
Expand Down Expand Up @@ -223,7 +224,8 @@ public void missingValue_explicit() {
.asc().missing().first()
) )
.isInstanceOf( SearchException.class )
.hasMessageContainingAll( "Missing first on sort with ascending order is not supported." );
.hasMessageContainingAll( "Invalid use of 'missing().first()' for an ascending distance sort.",
"Elasticsearch always assumes missing values have a distance of '+Infinity', and this behavior cannot be customized.");
}
else {
dataSet = dataSetForAsc;
Expand All @@ -244,7 +246,8 @@ public void missingValue_explicit() {
.asc().missing().use( getSingleValueForMissingUse( BEFORE_DOCUMENT_1_ORDINAL ) )
) )
.isInstanceOf( SearchException.class )
.hasMessageContainingAll( "Missing as on sort is not supported" );
.hasMessageContainingAll( "Invalid use of 'missing().use(...)' for a distance sort.",
"Elasticsearch always assumes missing values have a distance of '+Infinity', and this behavior cannot be customized.");

return;
}
Expand Down

0 comments on commit 6eadb2a

Please sign in to comment.