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 3ba7ebb commit bc678ac
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,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 @@ -797,7 +797,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 bc678ac

Please sign in to comment.