Skip to content

Commit

Permalink
Use jdk11 primitives in test to allow backport to branch_9x (#13311)
Browse files Browse the repository at this point in the history
  • Loading branch information
vigyasharma committed Apr 17, 2024
1 parent 93c1784 commit 94ced43
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ public void testTimeLimitingKnnCollectorManager() throws IOException {
TimeLimitingKnnCollectorManager noTimeoutManager =
new TimeLimitingKnnCollectorManager(delegate, null);
KnnCollector noTimeoutCollector =
noTimeoutManager.newCollector(Integer.MAX_VALUE, searcher.leafContexts.getFirst());
noTimeoutManager.newCollector(Integer.MAX_VALUE, searcher.leafContexts.get(0));

// Check that a normal collector is created without timeout
assertTrue(noTimeoutCollector instanceof TopKnnCollector);
Expand All @@ -829,7 +829,7 @@ public void testTimeLimitingKnnCollectorManager() throws IOException {
TimeLimitingKnnCollectorManager timeoutManager =
new TimeLimitingKnnCollectorManager(delegate, () -> true);
KnnCollector timeoutCollector =
timeoutManager.newCollector(Integer.MAX_VALUE, searcher.leafContexts.getFirst());
timeoutManager.newCollector(Integer.MAX_VALUE, searcher.leafContexts.get(0));

// Check that a time limiting collector is created, which returns partial results
assertFalse(timeoutCollector instanceof TopKnnCollector);
Expand Down

0 comments on commit 94ced43

Please sign in to comment.