From 94ced43b392220c0afbafe0fbe8ea82d55b65afb Mon Sep 17 00:00:00 2001 From: Vigya Sharma Date: Tue, 16 Apr 2024 23:17:43 -0700 Subject: [PATCH] Use jdk11 primitives in test to allow backport to branch_9x (#13311) --- .../org/apache/lucene/search/BaseKnnVectorQueryTestCase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lucene/core/src/test/org/apache/lucene/search/BaseKnnVectorQueryTestCase.java b/lucene/core/src/test/org/apache/lucene/search/BaseKnnVectorQueryTestCase.java index ef9c9e37d291..88265908a718 100644 --- a/lucene/core/src/test/org/apache/lucene/search/BaseKnnVectorQueryTestCase.java +++ b/lucene/core/src/test/org/apache/lucene/search/BaseKnnVectorQueryTestCase.java @@ -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); @@ -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);