Apache Lucene open-source search software
Use jdk11 primitives in test to allow backport to branch_9x (#13311)
Vigya Sharmabc678ac67e32
diff --git a/lucene/core/src/test/org/apache/lucene/search/BaseKnnVectorQueryTestCase.java b/lucene/core/src/test/org/apache/lucene/search/BaseKnnVectorQueryTestCase.javaindex 2ae0ae14a29..2546115ff4f 100644--- a/lucene/core/src/test/org/apache/lucene/search/BaseKnnVectorQueryTestCase.java+++ b/lucene/core/src/test/org/apache/lucene/search/BaseKnnVectorQueryTestCase.java@@ -781,7 +781,7 @@ abstract class BaseKnnVectorQueryTestCase extends LuceneTestCase {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 timeoutassertTrue(noTimeoutCollector instanceof TopKnnCollector);@@ -797,7 +797,7 @@ abstract class BaseKnnVectorQueryTestCase extends LuceneTestCase {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 resultsassertFalse(timeoutCollector instanceof TopKnnCollector);