Use jdk11 primitives in test to allow backport to branch_9x (#13311)

This commit is contained in:
Vigya Sharma 2024-04-16 23:17:43 -07:00 committed by GitHub
parent 3ba7ebbad8
commit bc678ac67e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -781,7 +781,7 @@ abstract class BaseKnnVectorQueryTestCase extends LuceneTestCase {
TimeLimitingKnnCollectorManager noTimeoutManager = TimeLimitingKnnCollectorManager noTimeoutManager =
new TimeLimitingKnnCollectorManager(delegate, null); new TimeLimitingKnnCollectorManager(delegate, null);
KnnCollector noTimeoutCollector = 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 // Check that a normal collector is created without timeout
assertTrue(noTimeoutCollector instanceof TopKnnCollector); assertTrue(noTimeoutCollector instanceof TopKnnCollector);
@ -797,7 +797,7 @@ abstract class BaseKnnVectorQueryTestCase extends LuceneTestCase {
TimeLimitingKnnCollectorManager timeoutManager = TimeLimitingKnnCollectorManager timeoutManager =
new TimeLimitingKnnCollectorManager(delegate, () -> true); new TimeLimitingKnnCollectorManager(delegate, () -> true);
KnnCollector timeoutCollector = 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 // Check that a time limiting collector is created, which returns partial results
assertFalse(timeoutCollector instanceof TopKnnCollector); assertFalse(timeoutCollector instanceof TopKnnCollector);