Skip to content

Commit

Permalink
HSEARCH-3517 Keep testing deprecated totalHitCount
Browse files Browse the repository at this point in the history
  • Loading branch information
fax4ever committed Sep 1, 2020
1 parent f660cc0 commit 64fd5b8
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,20 @@ public void resultTotal() {
assertThat( resultTotal.hitCountLowerBound() ).isEqualTo( 5000 );
}

@Test
@SuppressWarnings("deprecation") // we can remove the test when the deprecated API is removed
public void totalHitCount_deprecated() {
initData( 5000 );
StubMappingScope scope = index.createScope();

SearchResult<DocumentReference> fetch = scope.query()
.where( f -> f.matchAll() )
.toQuery()
.fetch( 10 );

assertThat( fetch.totalHitCount() ).isEqualTo( 5000 );
}

@Test
public void resultTotal_totalHitCountThreshold() {
assumeTrue(
Expand Down

0 comments on commit 64fd5b8

Please sign in to comment.