[TEST] re-enable boost assertions for queries that don't support it
This will be useful to find out whether we forgot to override `setFinalBoost`, otherwise any bost check is simply skipped.
This commit is contained in:
parent
50c43c9328
commit
6395349bc0
|
@ -320,7 +320,7 @@ public abstract class BaseQueryTestCase<QB extends AbstractQueryBuilder<QB>> ext
|
|||
Query namedQuery = context.copyNamedQueries().get(queryBuilder.queryName());
|
||||
assertThat(namedQuery, equalTo(query));
|
||||
}
|
||||
if (query != null && supportsBoostAndQueryName()) {
|
||||
if (query != null) {
|
||||
assertBoost(queryBuilder, query);
|
||||
}
|
||||
doAssertLuceneQuery(queryBuilder, query, context);
|
||||
|
|
|
@ -62,6 +62,11 @@ public class WrapperQueryBuilderTests extends BaseQueryTestCase<WrapperQueryBuil
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void assertBoost(WrapperQueryBuilder queryBuilder, Query query) throws IOException {
|
||||
//no-op boost is checked already above as part of doAssertLuceneQuery as we rely on lucene equals impl
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidate() {
|
||||
WrapperQueryBuilder wrapperQueryBuilder = new WrapperQueryBuilder((byte[]) null);
|
||||
|
|
Loading…
Reference in New Issue